1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
//
// NIRI CONFIG
// For more info see: https://github.com/YaLTeR/niri/wiki/
cursor {
hide-when-typing
//hide-after-inactive-ms 3000
xcursor-theme "Adwaita"
//xcursor-size 32
}
overview {
//zoom 0.25
}
hotkey-overlay {
skip-at-startup
}
input {
keyboard {
xkb {
layout "gb"
options "ctrl:nocaps"
//options "ctrl:swapcaps"
}
}
touchpad {
tap
dwt
middle-emulation
//natural-scroll
}
warp-mouse-to-focus
}
// Laptop
output "eDP-1" {
mode "2944x1849@60"
scale 2
}
// PC Monitor 1
output "DP-3" {
mode "3840x2160@60"
scale 1
transform "normal"
position x=1280 y=0
focus-at-startup
}
// PC Monitor 2
output "HDMI-A-5" {
mode "1920x1200@60"
scale 1
transform "90"
position x=1280 y=0
}
layout {
center-focused-column "never"
always-center-single-column
gaps 80
struts {
// left 64
// right 64
// top 64
// bottom 64
}
// Width proportions
preset-column-widths {
proportion 0.5
proportion 0.6
proportion 0.8
}
// Height proportions
preset-window-heights {
proportion 0.5
proportion 0.6
proportion 0.8
}
// Default new window proportion
default-column-width { proportion 0.5; }
focus-ring {
off
width 4
active-color "#7fc8ff"
inactive-color "#505050"
active-gradient from="purple" to="cyan" angle=45 relative-to="workspace-view"
inactive-gradient from="5050" to="#808080" angle=45 relative-to="workspace-view"
}
border {
width 4
active-color "#ffc87f"
inactive-color "#505050"
active-gradient from="purple" to="cyan" angle=45
inactive-gradient from="5050" to="#808080" angle=45 relative-to="workspace-view"
urgent-color "#9b0000"
}
shadow {
on
color "#0007"
softness 30
spread 5
offset x=0 y=5
}
}
// PROCESSES
spawn-at-startup "mako"
spawn-at-startup "waybar"
spawn-at-startup "foot" "--server"
spawn-at-startup "pipewire"
spawn-at-startup "pipewire-pulse"
spawn-at-startup "wireplumber"
spawn-at-startup "swaybg" "-i" "/home/blake/.cache/wallpaper"
spawn-at-startup "wlsunset" "-l" "51.5" "-L" "0.1" "-t" "2800" "-T" "6000"
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
prefer-no-csd
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
screenshot-path "~/images/screenshots/%F_%T.png"
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor.
// Values below 1 speed them up instead.
slowdown 2.0
}
//
// WINDOW RULES
//
// Default
window-rule {
geometry-corner-radius 8
clip-to-geometry true
}
window-rule {
match app-id="librewolf"
open-maximized false
}
window-rule {
match app-id="librewolf" title="^Picture-in-Picture$"
open-floating true
}
window-rule {
match app-id="swayimg"
open-maximized true
}
//
// KEYBINDINGS
//
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Return hotkey-overlay-title="Open a Terminal" { spawn "footclient"; }
Mod+Space hotkey-overlay-title="Search for an Application" { spawn "bemenu-run"; }
Super+Alt+L hotkey-overlay-title="Lock the Screen" { spawn "swaylock"; }
Mod+E hotkey-overlay-title="Open aFilebrowser" { spawn "Thunar"; }
Mod+B hotkey-overlay-title="Open a Web Browser" { spawn "librewolf"; }
Mod+I hotkey-overlay-title="Open a Text Editor" { spawn "footclient" "vim"; }
Mod+W hotkey-overlay-title="Set Wallpaper" { spawn "swayimg" "-g" "/home/blake/images/wallpaper/"; }
Mod+Q { close-window; }
// AUDIO
XF86AudioRaiseVolume allow-when-locked=true cooldown-ms=100 { spawn "volume" "up"; }
XF86AudioLowerVolume allow-when-locked=true cooldown-ms=100 { spawn "volume" "down"; }
XF86AudioMute allow-when-locked=true cooldown-ms=100 { spawn "volume" "mute"; }
XF86AudioMicMute allow-when-locked=true cooldown-ms=100 { spawn "volume" "mute" "mic"; }
// OVERVIEW
// Note: you can also move the mouse into the top-left hot corner,
// or do a four-finger swipe up on a touchpad.
Mod+O repeat=false { toggle-overview; }
// FOCUS WINDOW
Mod+Up { focus-window-up; }
Mod+Down { focus-window-down; }
Mod+Left { focus-column-left; }
Mod+Right { focus-column-right; }
Mod+J { focus-window-up; }
Mod+K { focus-window-down; }
Mod+L { focus-column-left; }
Mod+semicolon { focus-column-right; }
// MOVE WINDOW
Mod+Shift+Up { move-window-up; }
Mod+Shift+Down { move-window-down; }
Mod+Shift+Left { move-column-left; }
Mod+Shift+Right { move-column-right; }
Mod+Shift+J { move-window-up; }
Mod+Shift+K { move-window-down; }
Mod+Shift+L { move-column-left; }
Mod+Shift+semicolon { move-column-right; }
// Alternative commands that move across workspaces when reaching
// the first or last window in a column.
// Mod+J { focus-window-or-workspace-down; }
// Mod+K { focus-window-or-workspace-up; }
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
// FOCUS MONITOR
Mod+Ctrl+Up { focus-monitor-up; }
Mod+Ctrl+Down { focus-monitor-down; }
Mod+Ctrl+Left { focus-monitor-left; }
Mod+Ctrl+Right { focus-monitor-right; }
Mod+Ctrl+J { focus-monitor-up; }
Mod+Ctrl+K { focus-monitor-down; }
Mod+Ctrl+L { focus-monitor-left; }
Mod+Ctrl+semicolon { focus-monitor-right; }
// MOVE TO MONITOR
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+J { move-column-to-monitor-up; }
Mod+Shift+Ctrl+K { move-column-to-monitor-down; }
Mod+Shift+Ctrl+L { move-column-to-monitor-left; }
Mod+Shift+Ctrl+semicolon { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
// WORKSPACE
Mod+U { focus-workspace-up; }
Mod+D { focus-workspace-down; }
Mod+Ctrl+U { move-column-to-workspace-up; }
Mod+Ctrl+D { move-column-to-workspace-down; }
Mod+Shift+U { move-workspace-up; }
Mod+Shift+D { move-workspace-down; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+Ctrl+Shift+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+Ctrl+Shift+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+WheelScrollDown { focus-column-right; }
Mod+WheelScrollUp { focus-column-left; }
Mod+Shift+WheelScrollDown { move-column-right; }
Mod+Shift+WheelScrollUp { move-column-left; }
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Shift+1 { move-column-to-workspace 1; }
Mod+Shift+2 { move-column-to-workspace 2; }
Mod+Shift+3 { move-column-to-workspace 3; }
Mod+Shift+4 { move-column-to-workspace 4; }
Mod+Shift+5 { move-column-to-workspace 5; }
Mod+Shift+6 { move-column-to-workspace 6; }
Mod+Shift+7 { move-column-to-workspace 7; }
Mod+Shift+8 { move-column-to-workspace 8; }
Mod+Shift+9 { move-column-to-workspace 9; }
Mod+Ctrl+1 { move-window-to-workspace 1; }
Mod+Ctrl+2 { move-window-to-workspace 2; }
Mod+Ctrl+3 { move-window-to-workspace 3; }
Mod+Ctrl+4 { move-window-to-workspace 4; }
Mod+Ctrl+5 { move-window-to-workspace 5; }
Mod+Ctrl+6 { move-window-to-workspace 6; }
Mod+Ctrl+7 { move-window-to-workspace 7; }
Mod+Ctrl+8 { move-window-to-workspace 8; }
Mod+Ctrl+9 { move-window-to-workspace 9; }
Mod+P { focus-workspace-previous; }
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
Mod+Comma { consume-window-into-column; }
Mod+Period { expel-window-from-column; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Ctrl+F { expand-column-to-available-width; }
Mod+M { fullscreen-window; }
Mod+C { center-column; }
Mod+Ctrl+C { center-visible-columns; }
// Resize Width
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
// Resize Height
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
// Floating Window
Mod+Tab { toggle-window-floating; }
Mod+Ctrl+Tab { switch-focus-between-floating-and-tiling; }
// Toggle tabbed column display mode.
// Windows in this column will appear as vertical tabs,
// rather than stacked on top of each other.
//Mod+W { toggle-column-tabbed-display; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Shift+N { switch-layout "next"; }
// Mod+Shift+P { switch-layout "prev"; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
// Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here
// so they may, for example, forward the key presses as-is to a remote machine.
// It's a good idea to bind an escape hatch to toggle the inhibitor,
// so a buggy application can't hold your session hostage.
//
// The allow-inhibiting=false property can be applied to other binds as well,
// which ensures niri always processes them, even when an inhibitor is active.
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
Ctrl+Alt+Delete { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
}
|