// Author: Jianqun (https://jianqun.me) // Updated: 2026-06-03 // Input input { keyboard { xkb { layout "us"; } numlock } touchpad { tap dwt natural-scroll scroll-factor vertical=0.2 horizontal=0.1 disabled-on-external-mouse } mouse { natural-scroll } disable-power-key-handling } // Outputs output "eDP-1" { mode "1920x1080@60.008" scale 1.5 position x=0 y=0 focus-at-startup } /-output "HDMI-A-3" { mode "1920x1080@60.000" scale 1.0 position x=1280 y=-360 } /-output "Virtual-1" { mode "1360x768@60.015" scale 1.0 } // Layout layout { gaps 4 background-color "#5E5C64" center-focused-column "on-overflow" always-center-single-column default-column-width { proportion 0.5; } preset-column-widths { proportion 0.5; proportion 0.9; } preset-window-heights { proportion 0.5; proportion 0.9; proportion 1.0; } focus-ring { off; } border { width 2 active-color "#3584E4" inactive-color "#9A9996" urgent-color "#E5A50A" } shadow { on softness 10 spread 1 offset x=0 y=0 draw-behind-window true color "#0000004D" inactive-color "#0000004D" } tab-indicator { gap 4 width 2 length total-proportion=0.3 position "right" corner-radius 1 place-within-column } insert-hint { color "#3584E480"; } } // Layer Rules layer-rule { match namespace="^launcher$" geometry-corner-radius 10 } // Window Rules window-rule { draw-border-with-background false geometry-corner-radius 0 clip-to-geometry true } window-rule { match is-floating=false open-maximized true } /-window-rule { match app-id="^Alacritty$" opacity 0.9 background-effect { xray false; blur true; } } window-rule { match app-id="^chrome-nngceckbapebfimnlniiiahkandclblb-Default$" open-floating true default-column-width { proportion 0.5; } default-window-height { proportion 0.9; } max-width 500 max-height 900 } window-rule { match app-id="^org.fcitx.fcitx5-config-qt$" match app-id="^org.fcitx.fcitx5-qt5-gui-wrapper$" match app-id="^org.fcitx.fcitx5-qt6-gui-wrapper$" match app-id="^org.gnome.seahorse.Application$" open-floating true default-column-width { proportion 0.9; } default-window-height { proportion 0.9; } max-width 900 max-height 900 } window-rule { match app-id="^wev$" match title="^Picture-in-Picture$" match title="^Picture in picture$" match title="^画中画$" open-floating true open-focused false default-floating-position x=0 y=0 relative-to="bottom-right" default-column-width { fixed 320; } default-window-height { fixed 240; } max-width 320 max-height 320 } window-rule { match title="^Live Caption$" open-floating true open-focused false default-floating-position x=0 y=0 relative-to="top-right" border { off; } } window-rule { match is-floating=true title="is sharing your screen.$" open-floating true border { off; } } // Recent Windows recent-windows { debounce-ms 0 open-delay-ms 0 highlight { active-color "#3584E4FF" urgent-color "#E5A50AFF" } binds { Mod+Tab { next-window scope="all"; } Mod+Shift+Tab { previous-window scope="all"; } Alt+Tab { next-window scope="workspace"; } Alt+Shift+Tab { previous-window scope="workspace"; } } } // Key Bindings binds { Mod+Shift+Slash repeat=false { show-hotkey-overlay; } Mod+Shift+E repeat=false { quit; } Ctrl+Alt+Delete repeat=false { quit; } Mod+Shift+Q repeat=false { close-window; } Mod+H repeat=false { focus-column-left; } Mod+Left repeat=false { focus-column-left; } Mod+L repeat=false { focus-column-right; } Mod+Right repeat=false { focus-column-right; } Mod+J repeat=false { focus-window-down; } Mod+Down repeat=false { focus-window-down; } Mod+K repeat=false { focus-window-up; } Mod+Up repeat=false { focus-window-up; } Mod+Ctrl+H repeat=false { move-column-left; } Mod+Ctrl+Left repeat=false { move-column-left; } Mod+Ctrl+L repeat=false { move-column-right; } Mod+Ctrl+Right repeat=false { move-column-right; } Mod+Ctrl+J repeat=false { move-window-down; } Mod+Ctrl+Down repeat=false { move-window-down; } Mod+Ctrl+K repeat=false { move-window-up; } Mod+Ctrl+Up repeat=false { move-window-up; } Mod+Home repeat=false { focus-column-first; } Mod+End repeat=false { focus-column-last; } Mod+Ctrl+Home repeat=false { move-column-to-first; } Mod+Ctrl+End repeat=false { move-column-to-last; } Mod+U repeat=false { focus-workspace-down; } Mod+Page_Down repeat=false { focus-workspace-down; } Mod+I repeat=false { focus-workspace-up; } Mod+Page_Up repeat=false { focus-workspace-up; } Mod+Ctrl+U repeat=false { move-column-to-workspace-down; } Mod+Ctrl+Page_Down repeat=false { move-column-to-workspace-down; } Mod+Ctrl+I repeat=false { move-column-to-workspace-up; } Mod+Ctrl+Page_Up repeat=false { move-column-to-workspace-up; } Mod+Shift+U repeat=false { move-workspace-down; } Mod+Shift+Page_Down repeat=false { move-workspace-down; } Mod+Shift+I repeat=false { move-workspace-up; } Mod+Shift+Page_Up repeat=false { move-workspace-up; } Mod+R repeat=false { switch-preset-column-width; } Mod+Shift+R repeat=false { switch-preset-window-height; } Mod+Ctrl+R repeat=false { reset-window-height; } Mod+F repeat=false { maximize-column; } Mod+Shift+F repeat=false { fullscreen-window; } Mod+Ctrl+F repeat=false { expand-column-to-available-width; } Mod+Alt+F repeat=false { maximize-window-to-edges; } Mod+Minus repeat=false { set-column-width "-5%"; } Mod+Equal repeat=false { set-column-width "+5%"; } Mod+Shift+Minus repeat=false { set-window-height "-5%"; } Mod+Shift+Equal repeat=false { set-window-height "+5%"; } Mod+C repeat=false { center-column; } Mod+Ctrl+C repeat=false { center-visible-columns; } Mod+BracketLeft repeat=false { consume-or-expel-window-left; } Mod+BracketRight repeat=false { consume-or-expel-window-right; } Mod+Semicolon repeat=false { consume-window-into-column; } Mod+Apostrophe repeat=false { expel-window-from-column; } Mod+W repeat=false { toggle-column-tabbed-display; } Mod+V repeat=false { toggle-window-floating; } Mod+Shift+V repeat=false { switch-focus-between-floating-and-tiling; } Mod+O repeat=false { toggle-overview; } Mod+S repeat=false { screenshot show-pointer=true; } Mod+Shift+S repeat=false { screenshot-window show-pointer=true; } Mod+Ctrl+S repeat=false { screenshot-screen show-pointer=true; } Print repeat=false { screenshot-screen show-pointer=true; } Mod+Shift+H repeat=false { focus-monitor-left; } Mod+Shift+Left repeat=false { focus-monitor-left; } Mod+Shift+L repeat=false { focus-monitor-right; } Mod+Shift+Right repeat=false { focus-monitor-right; } Mod+Shift+J repeat=false { focus-monitor-down; } Mod+Shift+Down repeat=false { focus-monitor-down; } Mod+Shift+K repeat=false { focus-monitor-up; } Mod+Shift+Up repeat=false { focus-monitor-up; } Mod+Shift+Ctrl+H repeat=false { move-column-to-monitor-left; } Mod+Shift+Ctrl+Left repeat=false { move-column-to-monitor-left; } Mod+Shift+Ctrl+L repeat=false { move-column-to-monitor-right; } Mod+Shift+Ctrl+Right repeat=false { move-column-to-monitor-right; } Mod+Shift+Ctrl+J repeat=false { move-column-to-monitor-down; } Mod+Shift+Ctrl+Down repeat=false { move-column-to-monitor-down; } Mod+Shift+Ctrl+K repeat=false { move-column-to-monitor-up; } Mod+Shift+Ctrl+Up repeat=false { move-column-to-monitor-up; } Mod+Escape repeat=false allow-inhibiting=false \ { toggle-keyboard-shortcuts-inhibit; } Mod+T repeat=false hotkey-overlay-title="Open a Terminal" \ { spawn "alacritty" "msg" "create-window"; } Mod+D repeat=false hotkey-overlay-title="Run an Application" \ { spawn "fuzzel"; } Mod+Alt+L repeat=false hotkey-overlay-title="Lock the Screen" \ { spawn-sh "niri msg action power-off-monitors ; swaylock"; } Mod+N repeat=false hotkey-overlay-title=null\ { spawn "makoctl" "dismiss"; } Mod+Shift+N repeat=false hotkey-overlay-title=null\ { spawn "makoctl" "restore"; } MouseForward repeat=false allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } XF86AudioMute allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } XF86AudioLowerVolume allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.0625-"; } XF86AudioRaiseVolume allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.0625+" "-l" "1.0"; } Mod+M repeat=false allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } Mod+Comma allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.0625-"; } Mod+Period allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.0625+" "-l" "1.0"; } Mod+Shift+M repeat=false allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } Mod+Shift+Comma allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SOURCE@" "0.0625-"; } Mod+Shift+Period allow-when-locked=true hotkey-overlay-title=null \ { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SOURCE@" "0.0625+" "-l" "1.0"; } Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } } // Gestures gestures { hot-corners { off; } } // Miscellaneous environment { QT_QPA_PLATFORMTHEME "gtk3" ELECTRON_OZONE_PLATFORM_HINT "wayland" LIBVIRT_DEFAULT_URI "qemu:///system" } spawn-at-startup "fcitx5" "-d" spawn-at-startup "alacritty" "--daemon" spawn-sh-at-startup "DISPLAY=:0 xrdb -merge ~/.Xresources" spawn-sh-at-startup "sleep 1s; wpctl set-volume @DEFAULT_AUDIO_SINK@ 50%; wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1" screenshot-path "~/pictures/screenshots/screenshot_%Y%m%d%H%M%S.png" prefer-no-csd overview { zoom 0.5 backdrop-color "#5E5C64" workspace-shadow { softness 20 spread 2 offset x=0 y=0 color "#0000004D" } } cursor { xcursor-size 24; } clipboard { disable-primary; } hotkey-overlay { skip-at-startup; }