From 0ab0d39bb8c3c313768f2d169242fbc180c352ea Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Mon, 27 Mar 2023 01:32:04 +0200 Subject: [PATCH] Tweak dunst --- modules/desktop/dunst.nix | 98 +++++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 45 deletions(-) diff --git a/modules/desktop/dunst.nix b/modules/desktop/dunst.nix index f1abb2b..cfefe57 100644 --- a/modules/desktop/dunst.nix +++ b/modules/desktop/dunst.nix @@ -4,55 +4,63 @@ with lib; with lib.my; let cfg = config.modules.desktop.dunst; in { - options.modules.desktop.dunst = { - enable = mkBoolOpt false; - }; + options.modules.desktop.dunst = { enable = mkBoolOpt false; }; config = mkIf cfg.enable { home-manager.users.${config.user.name} = { - services.dunst = - { - enable = true; - settings = { - global = { - monitor = 0; - geometry = "350x5-30+50"; - transparency = 10; - font = "monospace 14"; - idle_threshold = 120; - allow_markup = "yes"; - format = "%s\n%b"; - show_age_threshold = 300; - word_wrap = "yes"; - sticky_history = "yes"; - sort = "yes"; - }; - frame = { - width = 3; - color = "#ebdbb2"; - }; - shortcuts = { - close = "ctrl+space"; - close_all = "ctrl+shift+space"; - history = "ctrl+grave"; - context = "ctrl+shift+period"; - }; - urgency_low = { - foreground = "#ebdbb2"; - background = "#32302f"; - timeout = 10; - }; - urgency_normal = { - foreground = "#ebdbb2"; - background = "#32302f"; - timeout = 10; - }; - urgency_critical = { - foreground = "#ebdbb2"; - background = "#32302f"; - timeout = 10; - }; + services.dunst = { + enable = true; + settings = { + global = { + alignment = "left"; + monitor = 0; + browser = "firefox -new-tab"; + corner_radius = 2; + dmenu = "${pkgs.rofi}/bin/rofi -dmenu -p dunst"; + follow = "none"; + origin = "top-right"; + width = 440; + offset = "26x26"; + history_length = 20; + icon_position = "right"; + horizontal_padding = 16; + ignore_newline = "no"; + separator_color = "auto"; + separator_height = 4; + line_height = 0; + max_icon_size = 64; + padding = 20; + shrink = "no"; + transparency = 5; + font = "monospace 14"; + idle_threshold = 120; + indicate_hidden = "yes"; + markup = "full"; + format = "%s (%a)\\n%b"; + show_age_threshold = 60; + show_indicators = "yes"; + word_wrap = "yes"; + sticky_history = "yes"; + sort = "yes"; + frame_width = 1; + frame_color = "#1d2021"; + }; + urgency_low = { + foreground = "#ebdbb2"; + background = "#3c3836"; + timeout = 8; + }; + urgency_normal = { + foreground = "#ebdbb2"; + background = "#32302f"; + timeout = 14; + }; + urgency_critical = { + foreground = "#32302f"; + background = "#cc241d"; + timeout = 0; }; }; + }; }; }; }