home-manager @ 199f5268ddeec261f5cba352d741f64517eb68e5

  1{
  2  pkgs,
  3  inputs,
  4  ...
  5}: {
  6  xdg.configFile."niri/config.kdl".text = ''
  7    gestures {
  8        hot-corners {
  9            off
 10        }
 11    }
 12
 13    input {
 14        keyboard {
 15            xkb {
 16                layout "us,de"
 17            }
 18        }
 19
 20        touchpad {
 21            tap
 22            natural-scroll
 23        }
 24    }
 25
 26    output "eDP-1" {
 27        mode "3840x2160@60.000"
 28    }
 29
 30    output "LG Electronics LG HDR 4K 0x0001A8D9" {
 31        mode "3840x2160@60.000"
 32    }
 33
 34    layout {
 35        gaps 0
 36        center-focused-column "never"
 37        preset-column-widths {
 38            proportion 0.33333
 39            proportion 0.5
 40            proportion 0.66667
 41        }
 42        default-column-width {
 43            proportion 0.5
 44        }
 45        focus-ring {
 46            off
 47        }
 48        struts {
 49            right 10
 50        }
 51
 52        border {
 53            width 3
 54            active-color "#7fc8ff"
 55            inactive-color "#DDDDDD"
 56        }
 57    }
 58
 59    overview {
 60        backdrop-color "#DDDDDD"
 61    }
 62
 63    spawn-at-startup "dbus-update-activation-environment" "WAYLAND_DISPLAY" "XDG_CURRENT_DESKTOP=sway"
 64    spawn-at-startup "openrc --user gui"
 65
 66    spawn-at-startup "xwayland-satellite" ":12"
 67    environment {
 68        DISPLAY ":12"
 69    }
 70
 71    spawn-at-startup "flatpak" "run" "com.slack.Slack"
 72    spawn-at-startup "telegram-desktop"
 73
 74    prefer-no-csd
 75
 76    screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
 77
 78
 79    binds {
 80        Mod+Shift+Slash { show-hotkey-overlay; }
 81
 82        Mod+T { spawn "ghostty"; }
 83        Mod+D { spawn "wofi" "--show" "run"; }
 84        Mod+O repeat=false { toggle-overview; }
 85        Mod+Shift+D { spawn "wofi" "--show" "drun"; }
 86        Super+Alt+L { spawn "swaylock"; }
 87
 88        Mod+Shift+Q { close-window; }
 89
 90        Mod+H     { focus-column-left; }
 91        Mod+J     { focus-window-or-workspace-down; }
 92        Mod+K     { focus-window-or-workspace-up; }
 93        Mod+L     { focus-column-right; }
 94
 95        Mod+Ctrl+H     { move-column-left; }
 96        Mod+Ctrl+J         { move-workspace-down; }
 97        Mod+Ctrl+K         { move-workspace-up; }
 98        Mod+Ctrl+L     { move-column-right; }
 99
100        Mod+Home { focus-column-first; }
101        Mod+End  { focus-column-last; }
102        Mod+Ctrl+Home { move-column-to-first; }
103        Mod+Ctrl+End  { move-column-to-last; }
104
105        Mod+Shift+H     { focus-monitor-left; }
106        Mod+Shift+J     { focus-monitor-down; }
107        Mod+Shift+K     { focus-monitor-up; }
108        Mod+Shift+L     { focus-monitor-right; }
109
110        Mod+Shift+Ctrl+H     { move-column-to-monitor-left; }
111        Mod+Shift+Ctrl+J     { move-column-to-monitor-down; }
112        Mod+Shift+Ctrl+K     { move-column-to-monitor-up; }
113        Mod+Shift+Ctrl+L     { move-column-to-monitor-right; }
114
115        // Alternatively, there are commands to move just a single window:
116        // Mod+Shift+Ctrl+Left  { move-window-to-monitor-left; }
117        // ...
118
119        // And you can also move a whole workspace to another monitor:
120        Mod+Shift+Ctrl+U  { move-workspace-to-monitor-left; }
121        Mod+Shift+Ctrl+I  { move-workspace-to-monitor-right; }
122        // ...
123
124        Mod+Page_Down      { focus-workspace-down; }
125        Mod+Page_Up        { focus-workspace-up; }
126        Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
127        Mod+Ctrl+Page_Up   { move-column-to-workspace-up; }
128        Mod+Ctrl+U         { move-column-to-workspace-down; }
129        Mod+Ctrl+I         { move-column-to-workspace-up; }
130
131        Mod+Shift+Page_Down { move-workspace-down; }
132        Mod+Shift+Page_Up   { move-workspace-up; }
133        Mod+Shift+U         { move-workspace-down; }
134        Mod+Shift+I         { move-workspace-up; }
135
136        Mod+WheelScrollDown      cooldown-ms=150 { focus-workspace-down; }
137        Mod+WheelScrollUp        cooldown-ms=150 { focus-workspace-up; }
138        Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
139        Mod+Ctrl+WheelScrollUp   cooldown-ms=150 { move-column-to-workspace-up; }
140
141        Mod+WheelScrollRight      { focus-column-right; }
142        Mod+WheelScrollLeft       { focus-column-left; }
143        Mod+Ctrl+WheelScrollRight { move-column-right; }
144        Mod+Ctrl+WheelScrollLeft  { move-column-left; }
145
146        Mod+Shift+WheelScrollDown      { focus-column-right; }
147        Mod+Shift+WheelScrollUp        { focus-column-left; }
148        Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
149        Mod+Ctrl+Shift+WheelScrollUp   { move-column-left; }
150
151        Mod+1 { focus-workspace "α"; }
152        Mod+2 { focus-workspace "γ"; }
153        Mod+3 { focus-workspace "δ"; }
154        Mod+4 { focus-workspace "ε"; }
155        Mod+5 { focus-workspace "ζ"; }
156        Mod+6 { focus-workspace "6"; }
157        Mod+7 { focus-workspace "7"; }
158        Mod+8 { focus-workspace "8"; }
159        Mod+9 { focus-workspace "9"; }
160        Mod+Minus { focus-workspace "-"; }
161        Mod+Ctrl+1 { move-column-to-workspace "α"; }
162        Mod+Ctrl+2 { move-column-to-workspace "γ"; }
163        Mod+Ctrl+3 { move-column-to-workspace "δ"; }
164        Mod+Ctrl+4 { move-column-to-workspace "ε"; }
165        Mod+Ctrl+5 { move-column-to-workspace "ζ"; }
166        Mod+Ctrl+6 { move-column-to-workspace "6"; }
167        Mod+Ctrl+7 { move-column-to-workspace "7"; }
168        Mod+Ctrl+8 { move-column-to-workspace "8"; }
169        Mod+Ctrl+9 { move-column-to-workspace "9"; }
170        Mod+Ctrl+Minus { move-column-to-workspace "-"; }
171
172        Mod+BracketLeft  { consume-or-expel-window-left; }
173        Mod+BracketRight { consume-or-expel-window-right; }
174
175        Mod+Comma  { consume-window-into-column; }
176        Mod+Period { expel-window-from-column; }
177
178        Mod+R { switch-preset-column-width; }
179        Mod+Shift+R { switch-preset-window-height; }
180        Mod+Ctrl+R { reset-window-height; }
181        Mod+F { maximize-column; }
182        Mod+Shift+F { fullscreen-window; }
183
184        Mod+Ctrl+F { expand-column-to-available-width; }
185
186        Mod+C { center-column; }
187
188        Mod+U { set-column-width "-10%"; }
189        Mod+I { set-column-width "+10%"; }
190
191        // Finer height adjustments when in column with other windows.
192        Mod+Shift+Minus { set-window-height "-10%"; }
193        Mod+Shift+Equal { set-window-height "+10%"; }
194
195        Mod+V       { toggle-window-floating; }
196        Mod+Shift+V { switch-focus-between-floating-and-tiling; }
197
198        Mod+W { toggle-column-tabbed-display; }
199
200        Mod+p { screenshot; }
201
202        Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
203
204        Mod+Shift+E { quit; }
205
206        Mod+Shift+P { power-off-monitors; }
207    }
208
209    workspace "α" {
210    }
211
212    workspace "γ" {
213    }
214
215    workspace "δ" {
216    }
217
218    workspace "ε" {
219    }
220
221    workspace "ζ" {
222    }
223
224    workspace "6" {
225    }
226
227    workspace "7" {
228    }
229
230    workspace "8" {
231    }
232
233    workspace "9" {
234    }
235
236    workspace "-" {
237    }
238
239    window-rule {
240        match app-id=r#"^com\.slack\.Slack$"#
241
242        open-on-workspace "chat"
243        block-out-from "screencast"
244    }
245
246    window-rule {
247        match app-id=r#"^org\.telegram\.desktop$"#
248
249        open-on-workspace "ζ"
250        block-out-from "screencast"
251    }
252
253    window-rule {
254        match app-id=r#"^Bitwarden$"#
255
256        open-on-workspace "res"
257        block-out-from "screencast"
258    }
259
260
261    window-rule {
262        match app-id=r#"^org\.pulseaudio\.pavucontrol$"#
263        match app-id=r#"^blueman\-manager$"#
264
265        open-floating true
266    }
267
268
269    layer-rule {
270        exclude namespace="^notifications$"
271
272        block-out-from "screencast"
273    }
274
275    // user private to hide private browser
276    // altgr-intl
277  '';
278}