feat: overhaul config — noctalia shell, niri keybinds, battery, extra packages
- niri: switch from replaceStrings patching to plain config.kdl for simplicity - niri: add Mod+Shift+Q (close), Mod+Shift+HJKL/Arrow (move window), Mod+Shift+1-9 (move to workspace) - niri: add layer-rule to disable background-blur on noctalia bar (fix seam) - noctalia: add capsule_group for cpu+ram (group:sysmon), panel_overlap, contact_shadow; corner_radius_scale 1.0 - noctalia: add all LC_* locale overrides in plasma-localerc (fix vi_VN calendar) - system: TLP (battery), UPower, disable power-profiles-daemon (conflicts with TLP) - system: DDC/CI support (ddcutil + i2c-dev + hardware.i2c) - system: enable fish shell system-wide - packages: add tree, fish, ddcutil; noctalia required services documented - README: full rewrite with current structure, keybinds, fresh-install steps
This commit is contained in:
@@ -1,98 +1,7 @@
|
||||
{ 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;
|
||||
xdg.configFile."niri/config.kdl".text = builtins.readFile ./config.kdl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user