From 4215c919b27e37b30e6d265702915ab0090893ba Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 27 Jul 2023 09:16:16 +0200 Subject: [PATCH] dunst: Restyle --- home-manager/modules/dunst/default.nix | 132 ++++++++++++++++++++----- 1 file changed, 110 insertions(+), 22 deletions(-) diff --git a/home-manager/modules/dunst/default.nix b/home-manager/modules/dunst/default.nix index 580e2cf..957bf1a 100644 --- a/home-manager/modules/dunst/default.nix +++ b/home-manager/modules/dunst/default.nix @@ -23,59 +23,147 @@ in settings = { global = { follow = "mouse"; - width = "(10, 960)"; + width = "(500,900)"; height = 200; origin = "top-right"; - offset = "25x50"; + offset = "25x150"; + + progress_bar = true; + progress_bar_height = 14; + progress_bar_frame_width = 1; + progress_bar_min_width = 150; + progress_bar_max_width = 300; + + # Show how many items are hidden indicate_hidden = "yes"; + + # Shrink window if it's smaller than the width shrink = false; - transparency = 15; + + # Transparency of the window + transparency = 1; + + # Draw a line between multiple notifications + separator_height = 6; + separator_color = "#272f57"; + notification_limit = 0; - separator_height = 1; - padding = 15; - horizontal_padding = 20; + + # Notification padding + padding = 16; + horizontal_padding = 16; + + # Disable frame/border frame_width = 0; - frame_color = "#282a36"; - separator_color = "frame"; + + # Sort by urgency sort = "yes"; - idle_threshold = 120; - font = "Iosevka Nerd Font 20"; + + # Disable idle time + idle_threshold = 0; + + # --- Text settings --- + # Font + font = "Iosevka Aile 20"; + + # Set line height to font height line_height = 0; + + # Reference for markup and formatting: + # bold + # italic + # strikethrough + # underline + # . + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % markup = "full"; - format = "%s %p\\n%b"; + format = "%a\\n%s %p\\n%b"; + + # Align the text center left alignment = "left"; vertical_alignment = "center"; - show_age_threshold = 60; + + # Show age if longer than these amount of seconds old + show_age_threshold = 120; + + # Wrap text if it doesn't fit word_wrap = "yes"; + + # Where to ellipsize when wrapping is disabled ellipsize = "middle"; + + # Use newlines (\n) in notifications ignore_newline = "no"; + + # Stack duplicate messages stack_duplicates = true; hide_duplicate_count = false; + + # Show indicators for URLs (U) and actions (A) show_indicators = "yes"; + + # --- Icons --- + # Align icons left icon_position = "left"; + + # Scale icons if smaller than min or larger than max min_icon_size = 64; max_icon_size = 64; + + # Avoid timing out hidden notifications sticky_history = "yes"; - history_length = 20; + + # Maximum amount of notifications in history + history_length = 100; + + # --- Misc --- + + browser = "${config.programs.firefox.package}/bin/firefox --new-tab"; + + # Don't run scripts if notification is suppressed + always_run_script = false; + + # Window title + title = "Dunst"; + + # Window class + class = "Dunst"; + + #Notification corner radius corner_radius = 5; + + # Don't ignore the dbus closeNotification + ignore_dbusclose = false; }; experimental = { per_monitor_dpi = false; }; urgency_low = { - background = "#282a36"; - foreground = "#aaaaaa"; - timeout = 10; + background = "#141929fe"; + foreground = "#dae1f2"; + highlight = "#6fa6e7"; + frame_color = "#272f57"; + timeout = 8; }; urgency_normal = { - background = "#282a36"; - foreground = "#eeeeee"; - timeout = 10; + background = "#141929fe"; + foreground = "#dae1f2"; + highlight = "#5ca1ff"; + frame_color = "#272f57"; + timeout = 8; }; urgency_high = { - background = "#ff5555"; - foreground = "#f8f8f2"; - frame_color = "#ffffff"; + background = "#5ca1ffff"; + highlight = "#fe6c5a"; + foreground = "#1c2138"; + frame_color = "#52426e"; timeout = 0; }; };