|
7 | 7 | home.packages = with pkgs; [ |
8 | 8 | xwayland-satellite |
9 | 9 | ]; |
| 10 | + services.swww.enable = true; |
10 | 11 | programs.niri = { |
11 | 12 | package = perSystem.niri.niri-unstable; |
12 | 13 | settings = { |
|
51 | 52 | prefer-no-csd = true; |
52 | 53 | layout = { |
53 | 54 | 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 | + }; |
61 | 63 | shadow = { |
62 | 64 | enable = false; |
63 | 65 | color = "#${config.colors.blue}"; |
|
104 | 106 | }; |
105 | 107 | insert-hint.display.color = "#${config.colors.green}88"; |
106 | 108 | }; |
| 109 | + debug = { |
| 110 | + honor-xdg-activation-with-invalid-serial = true; |
| 111 | + }; |
107 | 112 | window-rules = [ |
108 | 113 | { |
109 | 114 | clip-to-geometry = true; |
110 | 115 | 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; |
115 | 120 | }; |
116 | 121 | } |
117 | 122 | { |
|
156 | 161 | ]; |
157 | 162 | focus-ring = { |
158 | 163 | enable = true; |
159 | | - width = 2; |
| 164 | + width = 1; |
160 | 165 | active.color = "#${config.colors.bright-red}"; |
161 | 166 | inactive.color = "#${config.colors.bright-red}"; |
162 | 167 | }; |
| 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 | + }; |
163 | 174 | shadow = { |
164 | 175 | enable = true; |
165 | 176 | softness = 8; |
|
208 | 219 | # lock and suspend |
209 | 220 | "Mod+Backslash".action = spawn "${pkgs.swaylock-effects}/bin/swaylock" "-f"; |
210 | 221 | "Mod+Ctrl+Backslash".action = spawn "systemctl" "suspend"; |
211 | | - "Cancel".action = spawn "${pkgs.swaylock-effects}/bin/swaylock" "-f"; |
212 | 222 |
|
213 | 223 | # window actions |
214 | 224 | "Mod+Q".action = close-window; |
|
219 | 229 | "Mod+W".action = toggle-column-tabbed-display; |
220 | 230 | "Mod+Ctrl+V".action = toggle-window-floating; |
221 | 231 | "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 | | - # ''}"; |
234 | 232 | "Mod+Space".action = toggle-overview; |
235 | 233 |
|
236 | 234 | # window width |
237 | 235 | "Mod+R".action = switch-preset-column-width; |
238 | 236 | "Mod+Period".action = switch-preset-column-width; |
239 | 237 | "Mod+Comma".action = switch-preset-column-width-back; |
240 | | - "Mod+M".action = maximize-column; |
| 238 | + "Mod+M".action = maximize-window-to-edges; |
241 | 239 | "Mod+Ctrl+M".action = expand-column-to-available-width; |
242 | 240 | "Mod+XF86AudioRaiseVolume".action = switch-preset-column-width; |
243 | 241 | "Mod+XF86AudioLowerVolume".action = switch-preset-column-width-back; |
|
294 | 292 | "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"; |
295 | 293 | "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"; |
296 | 294 |
|
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 | | - |
301 | 295 | # 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; |
305 | 299 |
|
306 | 300 | # laptop screen |
307 | 301 | "Mod+Equal".action = spawn "niri" "msg" "output" "eDP-1" "on"; |
|
0 commit comments