···22// "/-" comments out the following node.
33// Check the wiki for a full description of the configuration:
44// https://yalter.github.io/niri/Configuration:-Introduction
55+environment {
66+ ELECTRON_OZONE_PLATFORM_HINT "auto"
77+ // DISPLAY ":0"
88+}
99+cursor {
1010+ // xcursor-theme "breeze_cursors"
1111+ xcursor-size 48
1212+ hide-when-typing
1313+ hide-after-inactive-ms 1000
1414+}
515// Input device configuration.
616// Find the full list of options on the wiki:
717// https://yalter.github.io/niri/Configuration:-Input
···2939 touchpad {
3040 // off
3141 tap
3232- // dwt
4242+ dwt
3343 // dwtp
3434- // drag false
3535- // drag-lock
4444+ drag true
4545+ drag-lock
3646 natural-scroll
3747 // accel-speed 0.2
3848 // accel-profile "flat"
···58685969 }
6070 // Uncomment this to make the mouse warp to the center of newly focused windows.
6161- warp-mouse-to-focus
7171+ warp-mouse-to-focus mode="center-xy-always"
6272 // Focus windows and outputs automatically when moving the mouse into them.
6373 // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
6464- focus-follows-mouse max-scroll-amount="0%"
7474+ // focus-follows-mouse max-scroll-amount="0%"
7575+ focus-follows-mouse
7676+ workspace-auto-back-and-forth
7777+ // mod-key "Alt"
7878+ // mod-key-nested "Super"
7979+}
8080+/-switch-events {
8181+lid-close { spawn "notify-send" "The laptop lid is closed!"; }
8282+lid-open { spawn "notify-send" "The laptop lid is open!"; }
6583}
6684// You can configure outputs by their name, which you can find
6785// by running `niri msg outputs` while inside a niri instance.
···95113// automatically.
96114position x=1280 y=0
97115}
116116+// Put swaybg inside the overview backdrop.
117117+layer-rule {
118118+ match namespace="^wallpaper$"
119119+ place-within-backdrop true
120120+}
98121// Settings that influence how windows are positioned and sized.
99122// Find more information on the wiki:
100123// https://yalter.github.io/niri/Configuration:-Layout
101124layout {
125125+ background-color "transparent"
102126 // Set gaps around windows in logical pixels.
103127 gaps 16
104128 // When to center a column when changing focus, options are:
···108132 // - "on-overflow", focusing a column will center it if it doesn't fit
109133 // together with the previously focused column.
110134 center-focused-column "never"
135135+ always-center-single-column
111136 // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
112137 preset-column-widths {
113138 // Proportion sets the width as a fraction of the output width, taking gaps into account.
···148173 // - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
149174 // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
150175 // Color of the ring on the active monitor.
151151- active-color "#7fc8ff"
176176+ active-color "#994ae8"
152177 // Color of the ring on inactive monitors.
153178 //
154179 // The focus ring only draws around the active window, so the only place
···216241 // You can also change the shadow color and opacity.
217242 color "#0007"
218243 }
219219- // Struts shrink the area occupied by windows, similarly to layer-shell panels.
244244+ // Struts shrink the area occupied by windows, similarly to layer-shell panels.
220245 // You can think of them as a kind of outer gaps. They are set in logical pixels.
221246 // Left and right struts will cause the next window to the side to always be visible.
222247 // Top and bottom struts will simply add outer gaps in addition to the area occupied by
223248 // layer-shell panels and regular gaps.
224249 /-struts {
225225- left 64
226226- right 64
227227- top 64
228228- bottom 64
250250+ left 4
251251+ right 4
252252+ top 4
253253+ bottom 4
254254+ }
255255+ tab-indicator {
256256+ hide-when-single-tab
257257+ place-within-column
258258+ position "right"
259259+ active-color "cyan"
260260+ inactive-color "magenta"
261261+ width 3
229262 }
263263+ empty-workspace-above-first
230264}
231265// Add lines like this to spawn processes at startup.
232266// Note that running niri as a session supports xdg-desktop-autostart,
···235269// This line starts waybar, a commonly used bar for Wayland compositors.
236270spawn-at-startup "ghostty"
237271spawn-at-startup "xfce4-panel"
272272+spawn-at-startup "xfce4-power-manager"
273273+spawn-at-startup "blueman-applet"
274274+spawn-at-startup "nm-applet"
275275+spawn-sh-at-startup "swaybg -i ~/.background.jpg"
238276// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
239277// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
240278hotkey-overlay {
···257295// The wiki explains how to configure individual animations:
258296// https://yalter.github.io/niri/Configuration:-Animations
259297animations {
260260- // Uncomment to turn off all animations.
298298+ // Uncomment to turn off all animations.
299299+ // You can also put "off" into each individual animation to disable it.
261300 // off
262262-263301 // Slow down all animations by this factor. Values below 1 speed them up instead.
264264- // slowdown 3.0
265265-302302+ slowdown 1.5
303303+ // Individual animations.
304304+ workspace-switch {
305305+ spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
306306+ }
307307+ window-open {
308308+ duration-ms 150
309309+ curve "ease-out-expo"
310310+ }
311311+ window-close {
312312+ duration-ms 150
313313+ curve "ease-out-quad"
314314+ }
315315+ horizontal-view-movement {
316316+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
317317+ }
318318+ window-movement {
319319+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
320320+ }
321321+ window-resize {
322322+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
323323+ }
324324+ config-notification-open-close {
325325+ spring damping-ratio=0.6 stiffness=1000 epsilon=0.001
326326+ }
327327+ screenshot-ui-open {
328328+ duration-ms 200
329329+ curve "ease-out-quad"
330330+ }
331331+ overview-open-close {
332332+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
333333+ }
266334}
267335// Window rules let you adjust behavior for individual windows.
268336// Find more information on the wiki:
···297365}
298366// Example: enable rounded corners for all windows.
299367// (This example rule is commented out with a "/-" in front.)
300300-/-window-rule {
301301-geometry-corner-radius 12
302302-clip-to-geometry true
368368+window-rule {
369369+ geometry-corner-radius 12
370370+ clip-to-geometry true
371371+}
372372+overview {
373373+ backdrop-color "#663399"
303374}
304375binds {
305376 // Keys consist of modifiers separated by + signs, followed by an XKB key name
···323394 Mod+A hotkey-overlay-title="Launch: xfce4-appfinder" {
324395 spawn "xfce4-appfinder"
325396 }
326326- Mod+P hotkey-overlay-title="Settings: xfce4-settings" {
397397+ Mod+S hotkey-overlay-title="Settings: xfce4-settings" {
327398 spawn "xfce4-settings-manager"
328399 }
329400 // Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
···753824 }
754825 // Powers off the monitors. To turn them back on, do any input like
755826 // moving the mouse or pressing any other key.
756756- Mod+Shift+P {
827827+ Mod+Alt+P {
757828 power-off-monitors
758829 }
759830}