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 "/usr/libexec/pipewire-launcher"
65 //spawn-at-startup "openrc --user gui"
66
67 spawn-at-startup "blueman-applet"
68 spawn-at-startup "mako"
69 spawn-at-startup "nm-applet"
70 spawn-at-startup "swaybg" "-c" "DDDDDD"
71 spawn-at-startup "waybar"
72
73 spawn-at-startup "xwayland-satellite" ":12"
74 environment {
75 DISPLAY ":12"
76 }
77
78 spawn-at-startup "flatpak" "run" "com.slack.Slack"
79 spawn-at-startup "telegram-desktop"
80
81 prefer-no-csd
82
83 screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
84
85
86 binds {
87 Mod+Shift+Slash { show-hotkey-overlay; }
88
89 Mod+T { spawn "ghostty"; }
90 Mod+D { spawn "wofi" "--show" "run"; }
91 Mod+O repeat=false { toggle-overview; }
92 Mod+Shift+D { spawn "wofi" "--show" "drun"; }
93 Super+Alt+L { spawn "swaylock"; }
94
95 Mod+Shift+Q { close-window; }
96
97 Mod+H { focus-column-left; }
98 Mod+J { focus-window-or-workspace-down; }
99 Mod+K { focus-window-or-workspace-up; }
100 Mod+L { focus-column-right; }
101
102 Mod+Ctrl+H { move-column-left; }
103 Mod+Ctrl+J { move-workspace-down; }
104 Mod+Ctrl+K { move-workspace-up; }
105 Mod+Ctrl+L { move-column-right; }
106
107 Mod+Home { focus-column-first; }
108 Mod+End { focus-column-last; }
109 Mod+Ctrl+Home { move-column-to-first; }
110 Mod+Ctrl+End { move-column-to-last; }
111
112 Mod+Shift+H { focus-monitor-left; }
113 Mod+Shift+J { focus-monitor-down; }
114 Mod+Shift+K { focus-monitor-up; }
115 Mod+Shift+L { focus-monitor-right; }
116
117 Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
118 Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
119 Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
120 Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
121
122 // Alternatively, there are commands to move just a single window:
123 // Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
124 // ...
125
126 // And you can also move a whole workspace to another monitor:
127 Mod+Shift+Ctrl+U { move-workspace-to-monitor-left; }
128 Mod+Shift+Ctrl+I { move-workspace-to-monitor-right; }
129 // ...
130
131 Mod+Page_Down { focus-workspace-down; }
132 Mod+Page_Up { focus-workspace-up; }
133 Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
134 Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
135 Mod+Ctrl+U { move-column-to-workspace-down; }
136 Mod+Ctrl+I { move-column-to-workspace-up; }
137
138 Mod+Shift+Page_Down { move-workspace-down; }
139 Mod+Shift+Page_Up { move-workspace-up; }
140 Mod+Shift+U { move-workspace-down; }
141 Mod+Shift+I { move-workspace-up; }
142
143 Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
144 Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
145 Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
146 Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
147
148 Mod+WheelScrollRight { focus-column-right; }
149 Mod+WheelScrollLeft { focus-column-left; }
150 Mod+Ctrl+WheelScrollRight { move-column-right; }
151 Mod+Ctrl+WheelScrollLeft { move-column-left; }
152
153 Mod+Shift+WheelScrollDown { focus-column-right; }
154 Mod+Shift+WheelScrollUp { focus-column-left; }
155 Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
156 Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
157
158 Mod+1 { focus-workspace "α"; }
159 Mod+2 { focus-workspace "γ"; }
160 Mod+3 { focus-workspace "δ"; }
161 Mod+4 { focus-workspace "ε"; }
162 Mod+5 { focus-workspace "ζ"; }
163 Mod+6 { focus-workspace "6"; }
164 Mod+7 { focus-workspace "7"; }
165 Mod+8 { focus-workspace "8"; }
166 Mod+9 { focus-workspace "9"; }
167 Mod+Minus { focus-workspace "-"; }
168 Mod+Ctrl+1 { move-column-to-workspace "α"; }
169 Mod+Ctrl+2 { move-column-to-workspace "γ"; }
170 Mod+Ctrl+3 { move-column-to-workspace "δ"; }
171 Mod+Ctrl+4 { move-column-to-workspace "ε"; }
172 Mod+Ctrl+5 { move-column-to-workspace "ζ"; }
173 Mod+Ctrl+6 { move-column-to-workspace "6"; }
174 Mod+Ctrl+7 { move-column-to-workspace "7"; }
175 Mod+Ctrl+8 { move-column-to-workspace "8"; }
176 Mod+Ctrl+9 { move-column-to-workspace "9"; }
177 Mod+Ctrl+Minus { move-column-to-workspace "-"; }
178
179 Mod+BracketLeft { consume-or-expel-window-left; }
180 Mod+BracketRight { consume-or-expel-window-right; }
181
182 Mod+Comma { consume-window-into-column; }
183 Mod+Period { expel-window-from-column; }
184
185 Mod+R { switch-preset-column-width; }
186 Mod+Shift+R { switch-preset-window-height; }
187 Mod+Ctrl+R { reset-window-height; }
188 Mod+F { maximize-column; }
189 Mod+Shift+F { fullscreen-window; }
190
191 Mod+Ctrl+F { expand-column-to-available-width; }
192
193 Mod+C { center-column; }
194
195 Mod+U { set-column-width "-10%"; }
196 Mod+I { set-column-width "+10%"; }
197
198 // Finer height adjustments when in column with other windows.
199 Mod+Shift+Minus { set-window-height "-10%"; }
200 Mod+Shift+Equal { set-window-height "+10%"; }
201
202 Mod+V { toggle-window-floating; }
203 Mod+Shift+V { switch-focus-between-floating-and-tiling; }
204
205 Mod+W { toggle-column-tabbed-display; }
206
207 Mod+p { screenshot; }
208
209 Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
210
211 Mod+Shift+E { quit; }
212
213 Mod+Shift+P { power-off-monitors; }
214 }
215
216 workspace "α" {
217 }
218
219 workspace "γ" {
220 }
221
222 workspace "δ" {
223 }
224
225 workspace "ε" {
226 }
227
228 workspace "ζ" {
229 }
230
231 workspace "6" {
232 }
233
234 workspace "7" {
235 }
236
237 workspace "8" {
238 }
239
240 workspace "9" {
241 }
242
243 workspace "-" {
244 }
245
246 window-rule {
247 match app-id=r#"^com\.slack\.Slack$"#
248
249 open-on-workspace "chat"
250 block-out-from "screencast"
251 }
252
253 window-rule {
254 match app-id=r#"^org\.telegram\.desktop$"#
255
256 open-on-workspace "ζ"
257 block-out-from "screencast"
258 }
259
260 window-rule {
261 match app-id=r#"^Bitwarden$"#
262
263 open-on-workspace "res"
264 block-out-from "screencast"
265 }
266
267
268 window-rule {
269 match app-id=r#"^org\.pulseaudio\.pavucontrol$"#
270 match app-id=r#"^blueman\-manager$"#
271
272 open-floating true
273 }
274
275
276 layer-rule {
277 exclude namespace="^notifications$"
278
279 block-out-from "screencast"
280 }
281
282 // user private to hide private browser
283 // altgr-intl
284 '';
285}