{ lib, config, ... }: with lib; let cfg = config.modules.desktop.dunst; in { options.modules.desktop.dunst = { enable = mkEnableOption "Enable dunst, a lightweight replacement for the notification daemons provided by most desktop environments"; }; config = mkIf cfg.enable { hm.services.dunst = { enable = true; settings = with config.colorScheme.palette; { global = { follow = "mouse"; width = 300; height = 145; frame_color = "#f5c2e7"; # catppuccin pink origin = "top-right"; vertical_alignment = "center"; ellipsize = "middle"; # various non-color theming settings offset = "15x15"; padding = 15; horizontal_padding = 15; text_icon_padding = 15; corner_radius = 8; gap_size = 8; frame_width = 1; icon_position = "left"; min_icon_size = 48; max_icon_size = 64; progress_bar = true; progress_bar_height = 8; progress_bar_frame_width = 1; progress_bar_min_width = 150; progress_bar_max_width = 300; alignment = "left"; markup = "full"; format = "%a\\n%s\\n%b"; font = with config.modules.desktop.fonts.fonts; "${sansSerif.family} ${toString sansSerif.size}"; word_wrap = "yes"; ignore_newline = "no"; ignore_dbusclose = false; mouse_left_click = "do_action, close_current"; mouse_middle_click = "close_all"; mouse_right_click = "close_current"; # sorting and history settings sort = "update"; notification_limit = 4; indicate_hidden = "yes"; idle_threshold = 120; history_length = 20; show_age_threshold = 60; show_indicators = "yes"; sticky_history = "yes"; stack_duplicates = true; hide_duplicate_count = false; always_run_script = true; }; urgency_low = { background = "#${base00}cc"; foreground = "#${base05}"; }; urgency_normal = { background = "#${base00}cc"; foreground = "#${base05}"; }; urgency_critical = { background = "#${base00}cc"; foreground = "#${base05}"; frame_color = "#${base08}"; # base16 spec says red }; }; }; }; }