niri: add full desktop stack (bar, launcher, notifications, configs)
Moves programs.niri into a dedicated niri.nix module and installs the usual Wayland userland — alacritty, fuzzel, waybar, mako, swaybg, grim/slurp/wl-clipboard, swaylock/swayidle/wlogout, xwayland-satellite, plus nm-applet/pavucontrol/playerctl/brightnessctl. Ships starter configs for niri (keybinds mirroring sway/KDE habits, screenshots to ~/Pictures/Screenshots, media keys, workspace switching, auto-lock via swayidle), waybar with a Catppuccin-ish style, mako, and fuzzel — all wired up through home-manager's xdg.configFile. https://claude.ai/code/session_01NrGdGEBRbDbWvHUb3Lho44
This commit is contained in:
+201
@@ -0,0 +1,201 @@
|
||||
// niri configuration
|
||||
// docs: https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
|
||||
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
layout "us"
|
||||
}
|
||||
repeat-delay 300
|
||||
repeat-rate 40
|
||||
}
|
||||
|
||||
touchpad {
|
||||
tap
|
||||
dwt
|
||||
natural-scroll
|
||||
accel-speed 0.2
|
||||
}
|
||||
|
||||
mouse {
|
||||
accel-speed 0.0
|
||||
}
|
||||
|
||||
warp-mouse-to-focus
|
||||
}
|
||||
|
||||
output "*" {
|
||||
// let niri autodetect; override here per-monitor if needed
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 12
|
||||
center-focused-column "never"
|
||||
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
}
|
||||
|
||||
default-column-width { proportion 0.5; }
|
||||
|
||||
focus-ring {
|
||||
width 2
|
||||
active-color "#7fc8ff"
|
||||
inactive-color "#3a3a3a"
|
||||
}
|
||||
|
||||
border {
|
||||
off
|
||||
}
|
||||
|
||||
struts {
|
||||
left 8
|
||||
right 8
|
||||
top 4
|
||||
bottom 4
|
||||
}
|
||||
}
|
||||
|
||||
cursor {
|
||||
xcursor-theme "Adwaita"
|
||||
xcursor-size 24
|
||||
}
|
||||
|
||||
prefer-no-csd
|
||||
|
||||
screenshot-path "~/Pictures/Screenshots/Screenshot-%Y-%m-%d-%H%M%S.png"
|
||||
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
environment {
|
||||
DISPLAY ":0"
|
||||
QT_QPA_PLATFORM "wayland;xcb"
|
||||
GDK_BACKEND "wayland,x11"
|
||||
MOZ_ENABLE_WAYLAND "1"
|
||||
_JAVA_AWT_WM_NONREPARENTING "1"
|
||||
}
|
||||
|
||||
spawn-at-startup "xwayland-satellite"
|
||||
spawn-at-startup "waybar"
|
||||
spawn-at-startup "mako"
|
||||
spawn-at-startup "swaybg" "-c" "#1e1e2e"
|
||||
spawn-at-startup "nm-applet" "--indicator"
|
||||
spawn-at-startup "swayidle" "-w" \
|
||||
"timeout" "600" "swaylock -f" \
|
||||
"timeout" "900" "niri msg action power-off-monitors" \
|
||||
"before-sleep" "swaylock -f"
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius 8
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id="^org\\.keepassxc\\.KeePassXC$"
|
||||
match app-id="^1Password$"
|
||||
block-out-from "screen-capture"
|
||||
}
|
||||
|
||||
binds {
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
// launchers
|
||||
Mod+Return { spawn "alacritty"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
Mod+E { spawn "dolphin"; }
|
||||
Mod+B { spawn "firefox"; }
|
||||
Mod+Ctrl+L { spawn "swaylock" "-f"; }
|
||||
Mod+Shift+Escape { spawn "wlogout"; }
|
||||
|
||||
// media keys
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%+"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
|
||||
XF86AudioPlay { spawn "playerctl" "play-pause"; }
|
||||
XF86AudioPause { spawn "playerctl" "play-pause"; }
|
||||
XF86AudioNext { spawn "playerctl" "next"; }
|
||||
XF86AudioPrev { spawn "playerctl" "previous"; }
|
||||
XF86MonBrightnessUp { spawn "brightnessctl" "set" "5%+"; }
|
||||
XF86MonBrightnessDown { spawn "brightnessctl" "set" "5%-"; }
|
||||
|
||||
// window management
|
||||
Mod+Q { close-window; }
|
||||
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+Right { focus-column-right; }
|
||||
Mod+Up { focus-window-up; }
|
||||
Mod+Down { focus-window-down; }
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+L { focus-column-right; }
|
||||
Mod+K { focus-window-up; }
|
||||
Mod+J { focus-window-down; }
|
||||
|
||||
Mod+Ctrl+Left { move-column-left; }
|
||||
Mod+Ctrl+Right { move-column-right; }
|
||||
Mod+Ctrl+Up { move-window-up; }
|
||||
Mod+Ctrl+Down { move-window-down; }
|
||||
Mod+Ctrl+H { move-column-left; }
|
||||
Mod+Ctrl+L { move-column-right; }
|
||||
Mod+Ctrl+K { move-window-up; }
|
||||
Mod+Ctrl+J { move-window-down; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
|
||||
Mod+Shift+Page_Down { move-column-to-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-column-to-workspace-up; }
|
||||
Mod+Shift+U { move-column-to-workspace-down; }
|
||||
Mod+Shift+I { move-column-to-workspace-up; }
|
||||
|
||||
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+Comma { consume-window-into-column; }
|
||||
Mod+Period { expel-window-from-column; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
Mod+C { center-column; }
|
||||
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||
|
||||
// screenshots
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
// session
|
||||
Mod+Shift+E { quit; }
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
}
|
||||
Reference in New Issue
Block a user