@@ -25,11 +25,8 @@ input {
25
25
// For more information, see xkeyboard-config(7).
26
26
27
27
// For example:
28
- // layout "us,ru"
29
- // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
30
28
layout "us,ru"
31
- options "grp:win_space_toggle,grp:alt_shift_toggle,grp_led:scroll"
32
-
29
+ options "grp:alt_shift_toggle,grp_led:scroll"
33
30
}
34
31
track-layout "window"
35
32
}
@@ -41,6 +38,7 @@ input {
41
38
tap
42
39
dwt
43
40
dwtp
41
+ // drag-lock
44
42
natural-scroll
45
43
// accel-speed 0.2
46
44
// accel-profile "flat"
@@ -211,6 +209,43 @@ layout {
211
209
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
212
210
}
213
211
212
+ // You can enable drop shadows for windows.
213
+ shadow {
214
+ // Uncomment the next line to enable shadows.
215
+ // on
216
+
217
+ // By default, the shadow draws only around its window, and not behind it.
218
+ // Uncomment this setting to make the shadow draw behind its window.
219
+ //
220
+ // Note that niri has no way of knowing about the CSD window corner
221
+ // radius. It has to assume that windows have square corners, leading to
222
+ // shadow artifacts inside the CSD rounded corners. This setting fixes
223
+ // those artifacts.
224
+ //
225
+ // However, instead you may want to set prefer-no-csd and/or
226
+ // geometry-corner-radius. Then, niri will know the corner radius and
227
+ // draw the shadow correctly, without having to draw it behind the
228
+ // window. These will also remove client-side shadows if the window
229
+ // draws any.
230
+ //
231
+ // draw-behind-window true
232
+
233
+ // You can change how shadows look. The values below are in logical
234
+ // pixels and match the CSS box-shadow properties.
235
+
236
+ // Softness controls the shadow blur radius.
237
+ softness 30
238
+
239
+ // Spread expands the shadow.
240
+ spread 5
241
+
242
+ // Offset moves the shadow relative to the window.
243
+ offset x= 0 y= 5
244
+
245
+ // You can also change the shadow color and opacity.
246
+ color "#0007"
247
+ }
248
+
214
249
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
215
250
// You can think of them as a kind of outer gaps. They are set in logical pixels.
216
251
// Left and right struts will cause the next window to the side to always be visible.
@@ -366,6 +401,8 @@ window-rule {
366
401
// block-out-from "screencast"
367
402
}
368
403
404
+ // Example: enable rounded corners for all windows.
405
+ // (This example rule is commented out with a "/-" in front.)
369
406
window-rule {
370
407
geometry-corner-radius 12
371
408
clip-to-geometry true
@@ -400,22 +437,28 @@ binds {
400
437
// Note: the entire command goes as a single argument in the end.
401
438
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
402
439
403
- // XF86TouchpadToggle { spawn ; }
404
- XF86AudioMute { spawn "bash" "-c" "pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send -c \" system\" \" $(pactl get-sink-mute @DEFAULT_SINK@)\" " ; }
405
- XF86AudioRaiseVolume { spawn "bash" "-c" "pactl set-sink-volume @DEFAULT_SINK@ +5% && notify-send -c \" system\" \" $(pactl get-sink-volume @DEFAULT_SINK@ | head -1 | tr -s ' ' | cut -d ' ' -f1,5)\" " ; }
406
- XF86AudioLowerVolume { spawn "bash" "-c" "pactl set-sink-volume @DEFAULT_SINK@ -5% && notify-send -c \" system\" \" $(pactl get-sink-volume @DEFAULT_SINK@ | head -1 | tr -s ' ' | cut -d ' ' -f1,5)\" " ; }
407
- XF86MonBrightnessDown { spawn "bash" "-c" "brightnessctl -c backlight set 1- && notify-send -c \" system\" \" Brightness: $(brightnessctl -m | cut -d',' -f4)\" " ; }
408
- XF86MonBrightnessUp { spawn "bash" "-c" "brightnessctl -c backlight set +1 && notify-send -c \" system\" \" Brightness: $(brightnessctl -m | cut -d',' -f4)\" " ; }
409
- // XF86Display { spawn ; }
410
- // XF86Suspend { spawn ; }
440
+ // Example volume keys mappings for PipeWire & WirePlumber.
441
+ // The allow-when-locked=true property makes them work even when the session is locked.
442
+ XF86AudioRaiseVolume allow-when-locked= true { spawn "bash" "-c" "pactl set-sink-volume @DEFAULT_SINK@ +5% && notify-send -c \" system\" \" $(pactl get-sink-volume @DEFAULT_SINK@ | head -1 | tr -s ' ' | cut -d ' ' -f1,5)\" " ; }
443
+ XF86AudioLowerVolume allow-when-locked= true { spawn "bash" "-c" "pactl set-sink-volume @DEFAULT_SINK@ -5% && notify-send -c \" system\" \" $(pactl get-sink-volume @DEFAULT_SINK@ | head -1 | tr -s ' ' | cut -d ' ' -f1,5)\" " ; }
444
+ XF86AudioMute allow-when-locked= true { spawn "bash" "-c" "pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send -c \" system\" \" $(pactl get-sink-mute @DEFAULT_SINK@)\" " ; }
445
+ XF86AudioMicMute allow-when-locked= true { spawn "bash" "-c" "pactl set-sink-mute @DEFAULT_AUDIO_SOURCE@" "toggle" ; }
446
+
447
+ XF86MonBrightnessDown allow-when-locked= true { spawn "bash" "-c" "brightnessctl -c backlight set 1- && notify-send -c \" system\" \" Brightness: $(brightnessctl -m | cut -d',' -f4)\" " ; }
448
+ XF86MonBrightnessUp allow-when-locked= true { spawn "bash" "-c" "brightnessctl -c backlight set +1 && notify-send -c \" system\" \" Brightness: $(brightnessctl -m | cut -d',' -f4)\" " ; }
449
+ // XF86Display allow-when-locked=true { spawn ; }
450
+ // XF86Suspend allow-when-locked=true { spawn ; }
451
+ // XF86TouchpadToggle allow-when-locked=true { spawn ; }
452
+
411
453
// Additional for VAIO laptops
412
454
// Eject CD-ROM key
413
- XF86Eject { spawn "~/.config/waybar/modules/unmount.sh" "unmount" ; }
455
+ XF86Eject { spawn "~/.config/waybar/modules/unmount.sh" "unmount" ; }
414
456
// ASSIST key
415
- Help { spawn "playerctl" "play-pause" ; }
457
+ Help { spawn "playerctl" "play-pause" ; }
416
458
// WEB key
417
- XF86HomePage { spawn "playerctl" "next" ; }
459
+ XF86HomePage { spawn "playerctl" "next" ; }
418
460
// VAIO key has no press code
461
+
419
462
Mod+Q { close-window ; }
420
463
421
464
Mod+Left { focus-column-left ; }
@@ -573,6 +616,11 @@ binds {
573
616
Mod+Ctrl+R { reset-window-height ; }
574
617
Mod+F { maximize-column ; }
575
618
Mod+Shift+F { fullscreen-window ; }
619
+
620
+ // Expand the focused column to space not taken up by other fully visible columns.
621
+ // Makes the column "fill the rest of the space".
622
+ Mod+Ctrl+F { expand-column-to-available-width ; }
623
+
576
624
Mod+C { center-column ; }
577
625
578
626
// Finer width adjustments.
@@ -594,28 +642,40 @@ binds {
594
642
Mod+V { toggle-window-floating ; }
595
643
Mod+Shift+V { switch-focus-between-floating-and-tiling ; }
596
644
645
+ // Toggle tabbed column display mode.
646
+ // Windows in this column will appear as vertical tabs,
647
+ // rather than stacked on top of each other.
648
+ Mod+W { toggle-column-tabbed-display ; }
649
+
597
650
// Actions to switch layouts.
598
651
// Note: if you uncomment these, make sure you do NOT have
599
652
// a matching layout switch hotkey configured in xkb options above.
600
653
// Having both at once on the same hotkey will break the switching,
601
654
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
602
- // Mod+Space { switch-layout "next"; }
603
- // Mod+Shift+Space { switch-layout "prev"; }
655
+ Mod+Space { switch-layout "next" ; }
656
+ Mod+Shift+Space { switch-layout "prev" ; }
604
657
605
658
Print { screenshot ; }
606
659
Ctrl+Print { screenshot-screen ; }
607
660
Alt+Print { screenshot-window ; }
608
661
662
+ // Applications such as remote-desktop clients and software KVM switches may
663
+ // request that niri stops processing the keyboard shortcuts defined here
664
+ // so they may, for example, forward the key presses as-is to a remote machine.
665
+ // It's a good idea to bind an escape hatch to toggle the inhibitor,
666
+ // so a buggy application can't hold your session hostage.
667
+ //
668
+ // The allow-inhibiting=false property can be applied to other binds as well,
669
+ // which ensures niri always processes them, even when an inhibitor is active.
670
+ Mod+Escape allow-inhibiting= false { toggle-keyboard-shortcuts-inhibit ; }
671
+
609
672
// The quit action will show a confirmation dialog to avoid accidental exits.
610
673
Mod+Shift+E { quit ; }
611
674
Ctrl+Alt+Delete { quit ; }
612
675
613
676
// Powers off the monitors. To turn them back on, do any input like
614
677
// moving the mouse or pressing any other key.
615
678
Mod+Shift+P { power-off-monitors ; }
616
-
617
- Mod+Ctrl+MouseLeft { close-window ; }
618
- Mod+MouseMiddle { maximize-column ; }
619
679
}
620
680
621
681
hotkey-overlay {
0 commit comments