Skip to content

Commit cf742c3

Browse files
committed
minor
1 parent 802cd38 commit cf742c3

9 files changed

Lines changed: 72 additions & 52 deletions

File tree

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
inputs.nixpkgs.follows = "nixpkgs";
2121
};
2222
impermanence.url = "github:nix-community/impermanence";
23+
zed.url = "github:zed-industries/zed";
2324

2425
# niri-unstable = {
2526
# url = "github:YaLTeR/niri/a11fe23cbf6ba01ae4c23679aa2f7d7d8b44baf4";
@@ -35,5 +36,5 @@
3536
# gridx.url = "path:/home/danieln/code/gridx";
3637
};
3738

38-
outputs = inputs: inputs.blueprint {inherit inputs;};
39+
outputs = inputs: inputs.blueprint { inherit inputs; };
3940
}

modules/home/class-laptop/applications.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
gnumeric
1515
google-chrome
1616
inkscape
17+
obsidian
1718
qview
1819
spotify
1920
xfce.thunar

modules/home/class-laptop/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
wev
4646
wl-mirror
4747
xdg-utils
48+
zed-editor-fhs
4849
# cli apps with graphical deps
4950
imagemagick
5051
pdftk

modules/home/class-laptop/niri.nix

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
home.packages = with pkgs; [
88
xwayland-satellite
99
];
10+
services.swww.enable = true;
1011
programs.niri = {
1112
package = perSystem.niri.niri-unstable;
1213
settings = {
@@ -51,13 +52,14 @@
5152
prefer-no-csd = true;
5253
layout = {
5354
empty-workspace-above-first = true;
54-
gaps = 2;
55-
# struts = {
56-
# top = -6;
57-
# bottom = -6;
58-
# left = -6;
59-
# right = -6;
60-
# };
55+
always-center-single-column = true;
56+
gaps = 12;
57+
struts = {
58+
top = -6;
59+
bottom = -6;
60+
left = -6;
61+
right = -6;
62+
};
6163
shadow = {
6264
enable = false;
6365
color = "#${config.colors.blue}";
@@ -104,14 +106,17 @@
104106
};
105107
insert-hint.display.color = "#${config.colors.green}88";
106108
};
109+
debug = {
110+
honor-xdg-activation-with-invalid-serial = true;
111+
};
107112
window-rules = [
108113
{
109114
clip-to-geometry = true;
110115
geometry-corner-radius = {
111-
bottom-left = 1.0;
112-
bottom-right = 1.0;
113-
top-left = 1.0;
114-
top-right = 1.0;
116+
bottom-left = 0.0;
117+
bottom-right = 10.0;
118+
top-left = 10.0;
119+
top-right = 0.0;
115120
};
116121
}
117122
{
@@ -156,10 +161,16 @@
156161
];
157162
focus-ring = {
158163
enable = true;
159-
width = 2;
164+
width = 1;
160165
active.color = "#${config.colors.bright-red}";
161166
inactive.color = "#${config.colors.bright-red}";
162167
};
168+
border = {
169+
enable = true;
170+
width = 1;
171+
active.color = "#${config.colors.bright-red}00";
172+
inactive.color = "#${config.colors.bright-red}00";
173+
};
163174
shadow = {
164175
enable = true;
165176
softness = 8;
@@ -208,7 +219,6 @@
208219
# lock and suspend
209220
"Mod+Backslash".action = spawn "${pkgs.swaylock-effects}/bin/swaylock" "-f";
210221
"Mod+Ctrl+Backslash".action = spawn "systemctl" "suspend";
211-
"Cancel".action = spawn "${pkgs.swaylock-effects}/bin/swaylock" "-f";
212222

213223
# window actions
214224
"Mod+Q".action = close-window;
@@ -219,25 +229,13 @@
219229
"Mod+W".action = toggle-column-tabbed-display;
220230
"Mod+Ctrl+V".action = toggle-window-floating;
221231
"Mod+V".action = switch-focus-between-floating-and-tiling;
222-
# "Mod+Space".action = spawn "${pkgs.writeScript "consume_next.py" ''
223-
# #!/usr/bin/env python
224-
# import subprocess
225-
#
226-
# p = subprocess.Popen(['niri', 'msg', '-j', 'event-stream'], stdout=subprocess.PIPE)
227-
#
228-
# for line in p.stdout:
229-
# line = line.decode('utf-8')
230-
# if 'WindowOpenedOrChanged' in line:
231-
# subprocess.call(['niri', 'msg', 'action', 'consume-or-expel-window-left'])
232-
# break
233-
# ''}";
234232
"Mod+Space".action = toggle-overview;
235233

236234
# window width
237235
"Mod+R".action = switch-preset-column-width;
238236
"Mod+Period".action = switch-preset-column-width;
239237
"Mod+Comma".action = switch-preset-column-width-back;
240-
"Mod+M".action = maximize-column;
238+
"Mod+M".action = maximize-window-to-edges;
241239
"Mod+Ctrl+M".action = expand-column-to-available-width;
242240
"Mod+XF86AudioRaiseVolume".action = switch-preset-column-width;
243241
"Mod+XF86AudioLowerVolume".action = switch-preset-column-width-back;
@@ -294,14 +292,10 @@
294292
"Mod+Ctrl+Left".action = spawn "fish" "-c" "niri msg -j windows | jq -er '.[]|select(.is_focused==true)|.is_floating' && niri msg action move-window-to-monitor-left || niri msg action move-column-left-or-to-monitor-left";
295293
"Mod+Ctrl+Right".action = spawn "fish" "-c" "niri msg -j windows | jq -er '.[]|select(.is_focused==true)|.is_floating' && niri msg action move-window-to-monitor-right || niri msg action move-column-right-or-to-monitor-right";
296294

297-
# swaylike workspace focus with wrapping
298-
# "Mod+Ctrl+J".action = spawn "fish" "-c" "niri msg -j workspaces | jq -r 'sort_by(.idx).[-2].is_focused' | grep true; and niri msg action focus-workspace (niri msg -j workspaces | jq -r 'sort_by(.idx).[0].idx'); or niri msg action focus-workspace-down";
299-
# "Mod+Ctrl+K".action = spawn "fish" "-c" "niri msg -j workspaces | jq -r 'sort_by(.idx).[0].is_focused' | grep true; and niri msg action focus-workspace (niri msg -j workspaces | jq -r 'sort_by(.idx).[-2].idx'); or niri msg action focus-workspace-up";
300-
301295
# monitors
302-
"Mod+Tab".action = focus-monitor-next;
303-
"Mod+Shift+Tab".action = move-window-to-monitor-next;
304-
"Mod+Ctrl+Tab".action = move-workspace-to-monitor-next;
296+
# "Mod+Tab".action = focus-monitor-next;
297+
# "Mod+Shift+Tab".action = move-window-to-monitor-next;
298+
# "Mod+Ctrl+Tab".action = move-workspace-to-monitor-next;
305299

306300
# laptop screen
307301
"Mod+Equal".action = spawn "niri" "msg" "output" "eDP-1" "on";

modules/home/common/development.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
lua-language-server
6060
luajit
6161
mermaid-cli
62+
nil
6263
nodePackages_latest.prettier
6364
nodePackages_latest.yaml-language-server
6465
pgcli

modules/home/common/nvim/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
owner = "nvim-treesitter";
9797
repo = "nvim-treesitter";
9898
rev = "main";
99-
sha256 = "sha256-kPB4KyhE0+mNfanTIzc4O+4wvw/u8lyHTHoQ368KWXI=";
99+
sha256 = "sha256-usW9Z8+yilTLzs+8BzTyJad0L7CEoopXV/ExMuWlpoc=";
100100
};
101101
in
102102
{
@@ -111,7 +111,7 @@
111111
owner = "nvim-treesitter";
112112
repo = "nvim-treesitter-textobjects";
113113
rev = "main";
114-
sha256 = "sha256-jjKT3bZHwZIVDsTw4m7cJm9G2JW8lUXasKTaiGzT0Ag=";
114+
sha256 = "sha256-w2dzc5oWyEoPUgbqaAuNKCeFeh81rYJPOCPVRnFC724=";
115115
};
116116
};
117117
"nvim/nixpkgs/nvim-treesitter" = {

modules/home/common/nvim/lua/plugins.lua

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,25 @@ return inject_all({
149149
["<left>"] = { "cancel", "fallback" },
150150
["<down>"] = { "show_and_insert", "select_next", "fallback" },
151151
["<up>"] = { "select_prev", "fallback" },
152-
["<right>"] = { "show_and_insert", "select_and_accept", "fallback" },
152+
["<c-right>"] = { "show_and_insert", "select_and_accept", "fallback" },
153+
["<right>"] = {
154+
function(cmp)
155+
local has_no_words_after = function()
156+
local col = vim.api.nvim_win_get_cursor(0)[2]
157+
local line = vim.api.nvim_get_current_line()
158+
if col == #line then
159+
return true
160+
end
161+
return line:sub(col + 1, col + 1):match("%s") ~= nil
162+
end
163+
164+
if has_no_words_after() then
165+
return cmp.show_and_insert()
166+
end
167+
end,
168+
"select_and_accept",
169+
"fallback",
170+
},
153171
},
154172
cmdline = {
155173
enabled = true,

modules/home/common/starship.nix

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343

4444
git_branch = {
4545
format = "[$symbol$branch(:$remote_branch)]($style)";
46-
symbol = " ";
46+
symbol = "󰘬 ";
4747
};
4848

4949
git_commit = {
50-
format = " [ $hash$tag]($style)";
50+
format = " [󰓼 $hash$tag]($style)";
5151
style = "purple";
5252
tag_disabled = false;
53-
tag_symbol = " ";
53+
tag_symbol = " 󰓼 ";
5454
};
5555

5656
git_state = {
@@ -59,13 +59,13 @@
5959
};
6060

6161
git_status = {
62-
format = "[$conflicted$deleted](red)[$modified](blue)[$staged$renamed](yellow)[$untracked$stashed](bright-black)[$ahead_behind](bold) ";
63-
ahead = " $count";
64-
behind = " $count";
65-
diverged = " $ahead_count $behind_count";
66-
conflicted = " 󱚟 $count";
62+
format = "[$conflicted](red)[$modified](blue)[$staged$renamed$deleted](yellow)[$untracked$stashed](bright-black)[$ahead_behind](bold) ";
63+
ahead = " $count";
64+
behind = " $count";
65+
diverged = " $ahead_count $behind_count";
66+
conflicted = " $count";
6767
deleted = "  $count";
68-
modified = " $count";
68+
modified = " 󰦒 $count";
6969
renamed = " 󰶻 $count";
7070
staged = " 󰘻 $count";
7171
stashed = "  $count";

modules/nixos/class-laptop/desktop.nix

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
inputs,
44
perSystem,
55
...
6-
}: {
6+
}:
7+
{
78
imports = [
89
inputs.niri.nixosModules.niri
910
];
@@ -34,9 +35,9 @@
3435
# nerd-fonts.noto
3536
# nerd-fonts.iosevka
3637
nerd-fonts.symbols-only
37-
noto-fonts
38-
noto-fonts-monochrome-emoji
39-
noto-fonts-lgc-plus
38+
# noto-fonts
39+
# noto-fonts-monochrome-emoji
40+
# noto-fonts-lgc-plus
4041
roboto
4142
roboto-mono
4243
];
@@ -56,7 +57,7 @@
5657
"org.freedesktop.impl.portal.Secret" = "gnome-keyring";
5758
};
5859
};
59-
extraPortals = [pkgs.xdg-desktop-portal-gtk];
60+
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
6061
};
6162

6263
environment.systemPackages = with pkgs; [
@@ -82,7 +83,10 @@
8283
};
8384

8485
security = {
85-
pam.services.swaylock = {};
86+
pam.services = {
87+
swaylock = { };
88+
login.enableGnomeKeyring = true;
89+
};
8690
rtkit.enable = true; # for pipewire
8791
};
8892
}

0 commit comments

Comments
 (0)