master
1spawn-at-startup "waybar"
2spawn-at-startup "kitty"
3spawn-at-startup "firefox"
4
5input {
6 keyboard {
7 xkb {
8 layout "us"
9 options "caps:ctrl_modifier"
10 }
11 }
12
13 touchpad {
14 tap
15 dwt
16 natural-scroll
17 accel-speed 0.55
18 accel-profile "flat"
19 scroll-method "two-finger"
20 }
21}
22
23output "eDP-1" {
24 mode "2256x1504@120.030"
25 scale 1.22
26 position x=0 y=0
27 background-color "#000000"
28}
29
30layout {
31 gaps 2
32 center-focused-column "never"
33 preset-column-widths {
34 proportion 0.25
35 proportion 0.33333
36 proportion 0.5
37 proportion 0.66667
38 proportion 0.75
39 proportion 1.0
40 }
41
42 default-column-width { proportion 0.5; }
43 focus-ring {
44 off
45 }
46 border {
47 width 2
48 active-color "#5a5a5a"
49 inactive-color "#505050"
50 }
51}
52
53screenshot-path "~/screenshot_%Y-%m-%d_%H-%M-%S.png"
54
55animations {
56 off
57}
58
59binds {
60 Mod+Shift+Slash { show-hotkey-overlay; }
61 Mod+T { spawn "kitty"; }
62 Mod+Y { spawn "firefox"; }
63 Ctrl+Alt+L { spawn "swaylock"; }
64
65 XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
66 XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
67 XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
68 XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
69
70 Mod+Q { close-window; }
71
72 Mod+H { focus-column-left; }
73 Mod+J { focus-window-down; }
74 Mod+K { focus-window-up; }
75 Mod+L { focus-column-right; }
76 Mod+Ctrl+H { move-column-left; }
77 Mod+Ctrl+J { move-window-down; }
78 Mod+Ctrl+K { move-window-up; }
79 Mod+Ctrl+L { move-column-right; }
80
81 // Alternative commands that move across workspaces when reaching
82 // the first or last window in a column.
83 // Mod+J { focus-window-or-workspace-down; }
84 // Mod+K { focus-window-or-workspace-up; }
85 // Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
86 // Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
87
88 Mod+Home { focus-column-first; }
89 Mod+End { focus-column-last; }
90 Mod+Ctrl+Home { move-column-to-first; }
91 Mod+Ctrl+End { move-column-to-last; }
92
93 Mod+Shift+H { focus-monitor-left; }
94 Mod+Shift+J { focus-monitor-down; }
95 Mod+Shift+K { focus-monitor-up; }
96 Mod+Shift+L { focus-monitor-right; }
97 Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
98 Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
99 Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
100 Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
101
102
103 Mod+Page_Down { focus-workspace-down; }
104 Mod+Page_Up { focus-workspace-up; }
105 Mod+U { focus-workspace-down; }
106 Mod+I { focus-workspace-up; }
107 Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
108 Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
109 Mod+Ctrl+U { move-column-to-workspace-down; }
110 Mod+Ctrl+I { move-column-to-workspace-up; }
111
112 Mod+Shift+Page_Down { move-workspace-down; }
113 Mod+Shift+Page_Up { move-workspace-up; }
114 Mod+Shift+U { move-workspace-down; }
115 Mod+Shift+I { move-workspace-up; }
116
117 Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
118 Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
119 Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
120 Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
121
122 Mod+WheelScrollRight { focus-column-right; }
123 Mod+WheelScrollLeft { focus-column-left; }
124 Mod+Ctrl+WheelScrollRight { move-column-right; }
125 Mod+Ctrl+WheelScrollLeft { move-column-left; }
126
127 Mod+Shift+WheelScrollDown { focus-column-right; }
128 Mod+Shift+WheelScrollUp { focus-column-left; }
129 Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
130 Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
131
132 // Similarly, you can bind touchpad scroll "ticks".
133 // Touchpad scrolling is continuous, so for these binds it is split into
134 // discrete intervals.
135 // These binds are also affected by touchpad's natural-scroll, so these
136 // example binds are "inverted", since we have natural-scroll enabled for
137 // touchpads by default.
138 Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
139 Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
140
141 // You can refer to workspaces by index. However, keep in mind that
142 // niri is a dynamic workspace system, so these commands are kind of
143 // "best effort". Trying to refer to a workspace index bigger than
144 // the current workspace count will instead refer to the bottommost
145 // (empty) workspace.
146 //
147 // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
148 // will all refer to the 3rd workspace.
149 Mod+1 { focus-workspace 1; }
150 Mod+2 { focus-workspace 2; }
151 Mod+3 { focus-workspace 3; }
152 Mod+4 { focus-workspace 4; }
153 Mod+5 { focus-workspace 5; }
154 Mod+6 { focus-workspace 6; }
155 Mod+7 { focus-workspace 7; }
156 Mod+8 { focus-workspace 8; }
157 Mod+9 { focus-workspace 9; }
158 Mod+Ctrl+1 { move-column-to-workspace 1; }
159 Mod+Ctrl+2 { move-column-to-workspace 2; }
160 Mod+Ctrl+3 { move-column-to-workspace 3; }
161 Mod+Ctrl+4 { move-column-to-workspace 4; }
162 Mod+Ctrl+5 { move-column-to-workspace 5; }
163 Mod+Ctrl+6 { move-column-to-workspace 6; }
164 Mod+Ctrl+7 { move-column-to-workspace 7; }
165 Mod+Ctrl+8 { move-column-to-workspace 8; }
166 Mod+Ctrl+9 { move-column-to-workspace 9; }
167
168 // Alternatively, there are commands to move just a single window:
169 // Mod+Ctrl+1 { move-window-to-workspace 1; }
170
171 // Switches focus between the current and the previous workspace.
172 // Mod+Tab { focus-workspace-previous; }
173
174 // The following binds move the focused window in and out of a column.
175 // If the window is alone, they will consume it into the nearby column to the side.
176 // If the window is already in a column, they will expel it out.
177 Mod+BracketLeft { consume-or-expel-window-left; }
178 Mod+BracketRight { consume-or-expel-window-right; }
179
180 // Consume one window from the right to the bottom of the focused column.
181 Mod+Comma { consume-window-into-column; }
182 // Expel the bottom window from the focused column to the right.
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 // Expand the focused column to space not taken up by other fully visible columns.
192 // Makes the column "fill the rest of the space".
193 Mod+Ctrl+F { expand-column-to-available-width; }
194
195 Mod+C { center-column; }
196
197 // Finer width adjustments.
198 // This command can also:
199 // * set width in pixels: "1000"
200 // * adjust width in pixels: "-5" or "+5"
201 // * set width as a percentage of screen width: "25%"
202 // * adjust width as a percentage of screen width: "-10%" or "+10%"
203 // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
204 // set-column-width "100" will make the column occupy 200 physical screen pixels.
205 Mod+Minus { set-column-width "-10%"; }
206 Mod+Equal { set-column-width "+10%"; }
207
208 // Finer height adjustments when in column with other windows.
209 Mod+Shift+Minus { set-window-height "-10%"; }
210 Mod+Shift+Equal { set-window-height "+10%"; }
211
212 // Move the focused window between the floating and the tiling layout.
213 //Mod+V { toggle-window-floating; }
214 //Mod+Shift+V { switch-focus-between-floating-and-tiling; }
215
216 // Toggle tabbed column display mode.
217 // Windows in this column will appear as vertical tabs,
218 // rather than stacked on top of each other.
219 Mod+W { toggle-column-tabbed-display; }
220
221 // Actions to switch layouts.
222 // Note: if you uncomment these, make sure you do NOT have
223 // a matching layout switch hotkey configured in xkb options above.
224 // Having both at once on the same hotkey will break the switching,
225 // since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
226 // Mod+Space { switch-layout "next"; }
227 // Mod+Shift+Space { switch-layout "prev"; }
228
229 Print { screenshot; }
230 Ctrl+Print { screenshot-screen; }
231 Alt+Print { screenshot-window; }
232
233 // Applications such as remote-desktop clients and software KVM switches may
234 // request that niri stops processing the keyboard shortcuts defined here
235 // so they may, for example, forward the key presses as-is to a remote machine.
236 // It's a good idea to bind an escape hatch to toggle the inhibitor,
237 // so a buggy application can't hold your session hostage.
238 //
239 // The allow-inhibiting=false property can be applied to other binds as well,
240 // which ensures niri always processes them, even when an inhibitor is active.
241 Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
242
243 // The quit action will show a confirmation dialog to avoid accidental exits.
244 Mod+Shift+E { quit; }
245 Ctrl+Alt+Delete { quit; }
246
247 // Powers off the monitors. To turn them back on, do any input like
248 // moving the mouse or pressing any other key.
249 Mod+Shift+P { power-off-monitors; }
250}