diff --git a/home/modules/theme.nix b/home/modules/theme.nix index f1295fd..f6213a2 100644 --- a/home/modules/theme.nix +++ b/home/modules/theme.nix @@ -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" diff --git a/home/modules/ui.nix b/home/modules/ui.nix index 14b02c0..be69a6c 100644 --- a/home/modules/ui.nix +++ b/home/modules/ui.nix @@ -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; diff --git a/scripts/theme b/scripts/theme index 8802113..58bf2a8 100755 --- a/scripts/theme +++ b/scripts/theme @@ -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 }