feat: replace waybar/walker/swaylock/swaybg with noctalia shell

This commit is contained in:
2026-08-14 00:17:36 +07:00
parent 96369087b5
commit 68f37753f5
14 changed files with 342 additions and 775 deletions
+98
View File
@@ -0,0 +1,98 @@
{ pkgs, lib, ... }:
let
# Start from niri's own default config so we inherit every new default
# automatically on updates. We patch only what we need to change.
base = builtins.readFile "${pkgs.niri.doc}/share/doc/niri/default-config.kdl";
# waybar → noctalia + add xwayland-satellite
r1 = builtins.replaceStrings
[ "spawn-at-startup \"waybar\"\n" ]
[ "spawn-at-startup \"noctalia\"\nspawn-at-startup \"xwayland-satellite\"\n" ]
base;
# terminal: alacritty → kitty
r2 = builtins.replaceStrings
[ " Mod+T hotkey-overlay-title=\"Open a Terminal: alacritty\" { spawn \"alacritty\"; }\n" ]
[ " Mod+T hotkey-overlay-title=\"Open a Terminal: kitty\" { spawn \"kitty\"; }\n" ]
r1;
# launcher: fuzzel → noctalia launcher + control-center
r3 = builtins.replaceStrings
[ " Mod+D hotkey-overlay-title=\"Run an Application: fuzzel\" { spawn \"fuzzel\"; }\n" ]
[ " Mod+Space hotkey-overlay-title=\"Noctalia: Launcher\" { spawn \"noctalia-ipc\" \"panel-toggle\" \"launcher\"; }\n Mod+S hotkey-overlay-title=\"Noctalia: Control Center\" { spawn \"noctalia-ipc\" \"panel-toggle\" \"control-center\"; }\n" ]
r2;
# lock: swaylock → noctalia
r4 = builtins.replaceStrings
[ " Super+Alt+L hotkey-overlay-title=\"Lock the Screen: swaylock\" { spawn \"swaylock\"; }\n" ]
[ " Super+Alt+L hotkey-overlay-title=\"Noctalia: Lock\" { spawn \"noctalia-ipc\" \"session\" \"lock\"; }\n" ]
r3;
# skip the hotkey overlay pop-up at startup
r5 = builtins.replaceStrings
[ " // skip-at-startup\n" ]
[ " skip-at-startup\n" ]
r4;
# tighter gaps
r6 = builtins.replaceStrings
[ " gaps 16\n" ]
[ " gaps 8\n" ]
r5;
# enable animations slowdown
r7 = builtins.replaceStrings
[ " // slowdown 3.0\n" ]
[ " slowdown 0.5\n" ]
r6;
# Our additions appended after the patched default config.
# A second `input { touchpad { } }` block overrides earlier touchpad settings.
customConfig = ''
// Touchpad
input {
touchpad {
tap
natural-scroll
accel-profile "flat"
scroll-factor 1.0
}
}
// Prefer no client-side decorations
prefer-no-csd
// Gestures
gestures {
hot-corners {
off
}
}
// Rounded corners
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
// Floating windows
window-rule {
match app-id=r#"^Tk$"#
match app-id=r#"^gimp$"# title=r#"Preferences"#
match app-id=r#"^mpv$"#
match app-id=r#"^soffice$"# title=r#"^Text Import"#
match app-id=r#"^thunar$"# title=r#"^Rename "#
match app-id=r#"^xarchiver$"#
match app-id=r#"firefox$"# title=r#"^Picture-in-Picture$"#
open-floating true
}
'';
in
{
imports = [ ./noctalia ./polkit ];
# .text writes a real file (not a nix-store symlink) so niri auto-reloads on rebuild
xdg.configFile."niri/config.kdl".text = r7 + customConfig;
}