// // 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 "firefox"; } 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; } }