fix(dunst): use dunstrc.d

This commit is contained in:
Barrett Ruth 2026-02-17 10:09:21 -05:00
parent d23b0ad45e
commit 9fb650e34f
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 29 additions and 30 deletions

View file

@ -110,7 +110,8 @@ in
link "$cfg/hypr/themes/$theme.conf" "$cfg/hypr/themes/theme.conf"
link "$cfg/waybar/themes/$theme.css" "$cfg/waybar/themes/theme.css"
link "$cfg/fuzzel/themes/$theme.ini" "$cfg/fuzzel/themes/theme.ini"
link "$cfg/dunst/themes/$theme.conf" "$cfg/dunst/themes/theme.conf"
$DRY_RUN_CMD mkdir -p "$cfg/dunst/dunstrc.d"
link "$cfg/dunst/themes/$theme.conf" "$cfg/dunst/dunstrc.d/theme.conf"
''}
link "$cfg/sioyek/themes/$theme.config" "$cfg/sioyek/themes/theme.config"
link "$cfg/fzf/themes/$theme" "$cfg/fzf/themes/theme"

View file

@ -280,34 +280,30 @@ in
services.dunst = {
enable = true;
settings = { };
};
xdg.configFile."dunst/dunstrc" = lib.mkForce {
text = ''
include ${config.xdg.configHome}/dunst/themes/theme.conf
[global]
font = SF Pro Display 13
width = (0, 400)
height = (0, 120)
origin = top-right
offset = (16, 16)
padding = 10
horizontal_padding = 10
frame_width = 3
separator_height = 1
gap_size = 8
corner_radius = 0
alignment = left
ellipsize = end
icon_position = left
max_icon_size = 32
[ctl]
appname = ctl
icon_position = off
format = %s
'';
settings = {
global = {
font = "SF Pro Display 13";
width = "(0, 400)";
height = "(0, 120)";
origin = "top-right";
offset = "(16, 16)";
padding = 10;
horizontal_padding = 10;
frame_width = 3;
separator_height = 1;
gap_size = 8;
corner_radius = 0;
alignment = "left";
ellipsize = "end";
icon_position = "left";
max_icon_size = 32;
};
ctl = {
appname = "ctl";
icon_position = "off";
format = "%s";
};
};
};
xdg.configFile."dunst/themes/midnight.conf".text = mkDunstTheme config.palettes.midnight;
xdg.configFile."dunst/themes/daylight.conf".text = mkDunstTheme config.palettes.daylight;

View file

@ -99,7 +99,9 @@ Linux)
dunst_themes="$cfg/dunst/themes"
[ -f "$dunst_themes/$theme.conf" ] && {
ln -sf "$dunst_themes/$theme.conf" "$dunst_themes/theme.conf"
mkdir -p "$cfg/dunst/dunstrc.d"
ln -sf "$dunst_themes/$theme.conf" "$cfg/dunst/dunstrc.d/theme.conf"
pkill -x dunst 2>/dev/null; sleep 0.2
systemctl --user restart dunst
}