Skip to content

Commit 03f20b1

Browse files
committed
feat!: deprecate 'dwindle', 'scroller' always, use hyprnome workspace
1 parent 45aa973 commit 03f20b1

File tree

5 files changed

+34
-183
lines changed

5 files changed

+34
-183
lines changed

hm/modules/linux/desktop-environment/hyprland/binds.nix

Lines changed: 18 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -6,94 +6,49 @@
66
}:
77
let
88
cfg = config.liminalOS.desktop.hyprland;
9+
hyprnome = "${pkgs.hyprnome}/bin/hyprnome --no-empty-before";
910
in
1011
{
1112
wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable {
1213
bind =
13-
(
14-
if cfg.hyprscroller.enable then
15-
[
16-
"$mod+Shift, $Left, scroller:movewindow, l"
17-
"$mod+Shift, $Right, scroller:movewindow, r"
18-
"$mod+Shift, $Up, scroller:movewindow, u"
19-
"$mod+Shift, $Down, scroller:movewindow, d"
20-
21-
# Move around
22-
"$mod, $Left, scroller:movefocus, l"
23-
"$mod, $Right, scroller:movefocus, r"
24-
"$mod, $Up, scroller:movefocus, u"
25-
"$mod, $Down, scroller:movefocus, d"
26-
]
27-
else
28-
# Move windows around
29-
[
30-
"$mod+Shift, $Left, movewindow, l"
31-
"$mod+Shift, $Right, movewindow, r"
32-
"$mod+Shift, $Up, movewindow, u"
33-
"$mod+Shift, $Down, movewindow, d"
34-
35-
# Move around
36-
"$mod, $Left, movefocus, l"
37-
"$mod, $Right, movefocus, r"
38-
"$mod, $Up, movefocus, u"
39-
"$mod, $Down, movefocus, d"
40-
41-
"$mod, V, togglesplit"
42-
]
43-
)
44-
++ (lib.optionals cfg.hyprscroller.enable [
14+
[
15+
"$mod+Shift, $Left, scroller:movewindow, l"
16+
"$mod+Shift, $Right, scroller:movewindow, r"
17+
"$mod+Shift, $Up, scroller:movewindow, u"
18+
"$mod+Shift, $Down, scroller:movewindow, d"
19+
20+
# Move around
21+
"$mod, $Left, scroller:movefocus, l"
22+
"$mod, $Right, scroller:movefocus, r"
23+
"$mod, $Up, scroller:movefocus, u"
24+
"$mod, $Down, scroller:movefocus, d"
4525
"$mod, comma, scroller:admitwindow"
4626
"$mod, period, scroller:expelwindow"
4727
"$mod, F, scroller:fitsize, active"
4828
"$mod, Y, scroller:fitsize, all"
4929
"$mod, semicolon, scroller:cyclesize, next"
5030
"$mod, apostrophe, scroller:cyclesize, previous"
5131

52-
"$mod+Shift, U, movetoworkspace, r+1"
53-
"$mod+Shift, I, movetoworkspace, r-1"
54-
55-
"$mod, U, workspace, r+1"
56-
"$mod, I, workspace, r-1"
32+
"$mod+Shift, U, exec, ${hyprnome} --move"
33+
"$mod+Shift, I, exec, ${hyprnome} --previous --move"
5734

58-
# harder to reach number keys
59-
"$mod, A, workspace, 1"
60-
"$mod, D, workspace, 2"
35+
"$mod, U, exec, ${hyprnome}"
36+
"$mod, I, exec, ${hyprnome} --previous"
6137

6238
"$mod, C, scroller:setmode, c"
6339
"$mod, V, scroller:setmode, r"
6440

6541
"$mod, G, scroller:jump"
6642
"$mod+Ctrl, G, scroller:toggleoverview"
67-
])
68-
++ [
6943
# Window actions
7044
"$mod, Q, killactive"
7145
"$mod, W, togglefloating"
7246
"$mod, Return, fullscreen"
7347

74-
"$mod, 1, workspace, 1"
75-
"$mod, 2, workspace, 2"
76-
"$mod, 3, workspace, 3"
77-
"$mod, 4, workspace, 4"
78-
"$mod, 5, workspace, 5"
79-
"$mod, 6, workspace, 6"
80-
"$mod, 7, workspace, 7"
81-
"$mod, 8, workspace, 8"
82-
"$mod, 9, workspace, 9"
83-
"$mod, 0, workspace, 10"
84-
85-
"$mod+Ctrl, bracketright, movetoworkspace, r+1"
86-
"$mod+Ctrl, bracketleft, movetoworkspace, r-1"
87-
88-
"$mod, bracketright, workspace, r+1"
89-
"$mod, bracketleft, workspace, r-1"
90-
9148
# Utilities
9249
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi application launcher
9350
"$mod, X, exec, pkill -x rofi || rofi -show window" # Run rofi window switcher
9451

95-
''$mod+Shift, P, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
96-
9752
"$mod, Backspace, exec, pkill -x wlogout || wlogout" # show logout menu
9853

9954
"$mod, Z, exec, loginctl lock-session"
@@ -104,53 +59,12 @@ in
10459
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox next"
10560
",XF86AudioRewind, exec, ${pkgs.playerctl}/bin/playerctl --player=%any,firefox previous"
10661

107-
# Move active window to a workspace with mainMod + SHIFT + [0-9]
108-
"$mod+Shift, 1, movetoworkspace, 1"
109-
"$mod+Shift, 2, movetoworkspace, 2"
110-
"$mod+Shift, 3, movetoworkspace, 3"
111-
"$mod+Shift, 4, movetoworkspace, 4"
112-
"$mod+Shift, 5, movetoworkspace, 5"
113-
"$mod+Shift, 6, movetoworkspace, 6"
114-
"$mod+Shift, 7, movetoworkspace, 7"
115-
"$mod+Shift, 8, movetoworkspace, 8"
116-
"$mod+Shift, 9, movetoworkspace, 9"
117-
"$mod+Shift, 0, movetoworkspace, 10"
118-
]
119-
++ (lib.optionals (!cfg.useAdvancedBindings) [
12062
"$mod, S, togglespecialworkspace"
12163
"$mod+Alt, S, movetoworkspacesilent, special"
12264
"$mod, Tab, workspace, previous"
65+
''$mod+Shift, P, exec, ${pkgs.grim}/bin/grim - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot full screen
12366
''$mod, P, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
124-
])
125-
++ (lib.optionals cfg.useAdvancedBindings [
126-
# Special workspace
127-
"$mod, C, togglespecialworkspace"
128-
"$mod+Alt, C, movetoworkspacesilent, special"
129-
130-
''$mod, semicolon, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.swappy}/bin/swappy -f -'' # Screenshot
131-
132-
"$mod, a, workspace, 1"
133-
"$mod, s, workspace, 2"
134-
"$mod, d, workspace, 3"
135-
"$mod, f, workspace, 4"
136-
"$mod, g, workspace, 5"
137-
"$mod, y, workspace, 6"
138-
"$mod, u, workspace, 7"
139-
"$mod, i, workspace, 8"
140-
"$mod, o, workspace, 9"
141-
"$mod, p, workspace, 10"
142-
143-
"$mod+Shift, a, movetoworkspace, 1"
144-
"$mod+Shift, s, movetoworkspace, 2"
145-
"$mod+Shift, d, movetoworkspace, 3"
146-
"$mod+Shift, f, movetoworkspace, 4"
147-
"$mod+Shift, g, movetoworkspace, 5"
148-
"$mod+Shift, y, movetoworkspace, 6"
149-
"$mod+Shift, u, movetoworkspace, 7"
150-
"$mod+Shift, i, movetoworkspace, 8"
151-
"$mod+Shift, o, movetoworkspace, 9"
152-
"$mod+Shift, p, movetoworkspace, 10"
153-
])
67+
]
15468
++ (lib.optionals config.liminalOS.programs.zen.enable [
15569
"$mod, B, exec, zen"
15670
])

hm/modules/linux/desktop-environment/hyprland/default.nix

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ in
2323
Whether to enable and rice Hyprland as well as some basic desktop utilities.
2424
'';
2525
};
26-
hyprscroller.enable = lib.mkOption {
27-
type = lib.types.bool;
28-
default = cfg.enable;
29-
description = ''
30-
Whether to enable the hyprscroller scrolling layout.
31-
'';
32-
};
33-
useAdvancedBindings = lib.mkEnableOption "advanced keybinds";
3426
gtkUseOpenGL = lib.mkOption {
3527
type = lib.types.bool;
3628
default = false;
@@ -85,17 +77,7 @@ in
8577

8678
wayland.windowManager.hyprland = {
8779
enable = true;
88-
plugins = lib.mkIf cfg.hyprscroller.enable [
89-
(pkgs.hyprlandPlugins.hyprscroller.overrideAttrs {
90-
version = "0.47.2";
91-
src = pkgs.fetchFromGitHub {
92-
owner = "dawsers";
93-
repo = "hyprscroller";
94-
rev = "ce7503685297d88e0bb0961343ed3fbed21c559c";
95-
hash = "sha256-3pGIe4H1LUOJw0ULfVwZ7Ph7r/AyEipx7jbWP7zz3MU=";
96-
};
97-
})
98-
];
80+
plugins = [ pkgs.hyprlandPlugins.hyprscroller ];
9981
settings = {
10082
"$mod" = "SUPER";
10183
"$Left" = "H";
@@ -154,17 +136,8 @@ in
154136
"windowsMove, 1, 5, wind, slide"
155137
"fade, 1, 10, default"
156138
# "layers, 1, 8, default, slide"
139+
"workspaces, 1, 5, wind, slidevert"
157140
]
158-
++ (
159-
if cfg.hyprscroller.enable then
160-
[
161-
"workspaces, 1, 5, wind, slidevert"
162-
]
163-
else
164-
[
165-
"workspaces, 1, 5, wind"
166-
]
167-
)
168141
++ (lib.optionals (!osConfig.liminalOS.powersave) [
169142
"border, 1, 1, liner"
170143
"borderangle, 1, 30, liner, loop"
@@ -183,7 +156,7 @@ in
183156
# "col.inactive_border" = pkgs.lib.mkForce "rgba(b4befecc) rgba(6c7086cc) 45deg";
184157
"col.active_border" = "rgba(${colors.base0A}ff) rgba(${colors.base09}ff) 45deg";
185158
"col.inactive_border" = "rgba(${colors.base01}cc) rgba(${colors.base02}cc) 45deg";
186-
layout = if cfg.hyprscroller.enable then "scroller" else "dwindle";
159+
layout = "scroller";
187160
resize_on_border = "true";
188161
};
189162

@@ -215,7 +188,7 @@ in
215188
input = {
216189
sensitivity = if config.liminalOS.formFactor == "laptop" then "0.0" else "-0.65";
217190
};
218-
plugin.scroller = lib.mkIf cfg.hyprscroller.enable {
191+
plugin.scroller = {
219192
column_widths = "onethird onehalf twothirds one";
220193
column_heights = "onethird onehalf twothirds one";
221194
};

hm/modules/linux/desktop-environment/waybar/default.nix

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -253,52 +253,13 @@ in
253253
show-special = true;
254254
format = "{icon}";
255255
on-click = "activate";
256-
format-icons =
257-
{
258-
"1" = "";
259-
"2" = "";
260-
"3" = "󰯵";
261-
"4" = "󰯻";
262-
"5" = "󰯾";
263-
"6" = "󰰴";
264-
"7" = "󰰨";
265-
"8" = "󰰄";
266-
"9" = "";
267-
"10" = "";
268-
active = "";
269-
empty = "";
270-
default = "";
271-
urgent = "";
272-
special = "󰠱";
273-
}
274-
// (
275-
if (config.liminalOS.desktop.hyprland.useAdvancedBindings) then
276-
{
277-
"1" = "";
278-
"2" = "";
279-
"3" = "󰯵";
280-
"4" = "󰯻";
281-
"5" = "󰯾";
282-
"6" = "󰰴";
283-
"7" = "󰰨";
284-
"8" = "";
285-
"9" = "";
286-
"10" = "";
287-
}
288-
else
289-
{
290-
"1" = "";
291-
"2" = "";
292-
"3" = "󰰊";
293-
"4" = "󰰍";
294-
"5" = "";
295-
"6" = "";
296-
"7" = "󰰨";
297-
"8" = "";
298-
"9" = "";
299-
"10" = "";
300-
}
301-
);
256+
format-icons = {
257+
active = "";
258+
empty = "";
259+
default = "";
260+
urgent = "";
261+
special = "󰠱";
262+
};
302263
sort-by-number = true;
303264
};
304265

hm/modules/linux/var/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,5 +610,9 @@
610610
"settingsSyncVersion": 1731210778467
611611
},
612612
"splashColor": "rgb(242, 244, 248)",
613-
"splashBackground": "rgb(22, 22, 22)"
613+
"splashBackground": "rgb(22, 22, 22)",
614+
"spellCheckLanguages": [
615+
"en-US",
616+
"en"
617+
]
614618
}

reference/users/youwen/hm.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
liminalOS = {
2323
utils.easyeffects.enable = true;
2424
desktop.hyprland.screenlocker.useNvidiaCrashFix = true;
25-
desktop.hyprland.useAdvancedBindings = false;
2625
};
2726

2827
programs.git = {

0 commit comments

Comments
 (0)