feat: replace waybar/walker/swaylock/swaybg with noctalia shell
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
{ config, inputs, pkgs, ... }:
|
||||
let
|
||||
wallpaperDir = "${config.home.homeDirectory}/.config/wallpapers";
|
||||
defaultWallpaper = "${wallpaperDir}/even-in-arcadia.png";
|
||||
|
||||
noctaliaIpc = pkgs.writeShellScriptBin "noctalia-ipc" ''
|
||||
set -eu
|
||||
exec noctalia msg "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ inputs.noctalia.homeModules.default ];
|
||||
|
||||
home.packages = [ noctaliaIpc ];
|
||||
|
||||
# Wallpapers tracked in the repo; linked to ~/.config/wallpapers for noctalia
|
||||
xdg.configFile."wallpapers".source = ./wallpapers;
|
||||
|
||||
programs.noctalia = {
|
||||
enable = true;
|
||||
settings = {
|
||||
bar.default = {
|
||||
start = [ "launcher" "clipboard" "cpu" "network" "ram" ];
|
||||
center = [ "clock" ];
|
||||
end = [ "notifications" "volume" "brightness" "battery" "control-center" "session" ];
|
||||
thickness = 40;
|
||||
padding = 10;
|
||||
radius = 0;
|
||||
margin_edge = 0;
|
||||
margin_ends = 0;
|
||||
widget_spacing = 8;
|
||||
};
|
||||
|
||||
idle = {
|
||||
behavior_order = [ "lock" "screen-off" ];
|
||||
behavior = {
|
||||
lock = {
|
||||
action = "lock";
|
||||
enabled = true;
|
||||
timeout = 600;
|
||||
};
|
||||
screen-off = {
|
||||
action = "screen_off";
|
||||
enabled = true;
|
||||
timeout = 660;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lockscreen.wallpaper = defaultWallpaper;
|
||||
|
||||
nightlight.enabled = true;
|
||||
|
||||
osd.position = "top_right";
|
||||
|
||||
shell = {
|
||||
font_family = "JetBrainsMono Nerd Font";
|
||||
polkit_agent = true;
|
||||
corner_radius_scale = 0.0;
|
||||
animation.speed = 1.5;
|
||||
panel = {
|
||||
clipboard_placement = "attached";
|
||||
launcher_placement = "attached";
|
||||
launcher_session_search = true;
|
||||
};
|
||||
shadow.alpha = 0.5;
|
||||
};
|
||||
|
||||
theme.builtin = "Kanagawa";
|
||||
|
||||
wallpaper = {
|
||||
enabled = true;
|
||||
directory = wallpaperDir;
|
||||
default.path = defaultWallpaper;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.3 MiB |
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.kdePackages.polkit-kde-agent-1 ];
|
||||
|
||||
systemd.user.services.polkit-kde-agent = {
|
||||
Unit = {
|
||||
Description = "KDE Polkit Authentication Agent";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user