nixos-config/home-manager/modules/dunst/default.nix

173 lines
4.3 KiB
Nix
Raw Normal View History

{ pkgs
, config
, lib
, ...
2022-03-01 22:19:03 +01:00
}:
with lib; let
cfg = config.eboskma.programs.dunst;
in
{
2021-11-25 17:18:13 +01:00
options.eboskma.programs.dunst = {
enable = mkEnableOption "activate dunst";
};
2022-05-03 18:17:38 +02:00
config = mkIf cfg.enable {
2021-11-25 17:18:13 +01:00
services.dunst = {
enable = true;
iconTheme = {
name = "elementary";
2021-11-25 17:18:13 +01:00
package = pkgs.papirus-icon-theme;
size = "symbolic";
};
settings = {
global = {
follow = "mouse";
2023-07-27 09:16:16 +02:00
width = "(500,900)";
2021-11-25 17:18:13 +01:00
height = 200;
origin = "top-right";
2023-07-27 09:16:16 +02:00
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
2021-11-25 17:18:13 +01:00
indicate_hidden = "yes";
2023-07-27 09:16:16 +02:00
# Shrink window if it's smaller than the width
2021-11-25 17:18:13 +01:00
shrink = false;
2023-07-27 09:16:16 +02:00
# Transparency of the window
transparency = 1;
# Draw a line between multiple notifications
separator_height = 6;
separator_color = "#272f57";
2021-11-25 17:18:13 +01:00
notification_limit = 0;
2023-07-27 09:16:16 +02:00
# Notification padding
padding = 16;
horizontal_padding = 16;
# Disable frame/border
2021-11-25 17:18:13 +01:00
frame_width = 0;
2023-07-27 09:16:16 +02:00
# Sort by urgency
2021-11-25 17:18:13 +01:00
sort = "yes";
2023-07-27 09:16:16 +02:00
# Disable idle time
idle_threshold = 0;
# --- Text settings ---
# Font
font = "Iosevka Aile 20";
# Set line height to font height
2021-11-25 17:18:13 +01:00
line_height = 0;
2023-07-27 09:16:16 +02:00
# Reference for markup and formatting:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
# %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 %
2021-11-25 17:18:13 +01:00
markup = "full";
2023-07-27 09:16:16 +02:00
format = "<b>%a</b>\\n%s %p\\n%b";
# Align the text center left
2021-11-25 17:18:13 +01:00
alignment = "left";
vertical_alignment = "center";
2023-07-27 09:16:16 +02:00
# Show age if longer than these amount of seconds old
show_age_threshold = 120;
# Wrap text if it doesn't fit
2021-11-25 17:18:13 +01:00
word_wrap = "yes";
2023-07-27 09:16:16 +02:00
# Where to ellipsize when wrapping is disabled
2021-11-25 17:18:13 +01:00
ellipsize = "middle";
2023-07-27 09:16:16 +02:00
# Use newlines (\n) in notifications
2021-11-25 17:18:13 +01:00
ignore_newline = "no";
2023-07-27 09:16:16 +02:00
# Stack duplicate messages
2021-11-25 17:18:13 +01:00
stack_duplicates = true;
hide_duplicate_count = false;
2023-07-27 09:16:16 +02:00
# Show indicators for URLs (U) and actions (A)
2021-11-25 17:18:13 +01:00
show_indicators = "yes";
2023-07-27 09:16:16 +02:00
# --- Icons ---
# Align icons left
2021-11-25 17:18:13 +01:00
icon_position = "left";
2023-07-27 09:16:16 +02:00
# Scale icons if smaller than min or larger than max
2021-11-25 17:18:13 +01:00
min_icon_size = 64;
max_icon_size = 64;
2023-07-27 09:16:16 +02:00
# Avoid timing out hidden notifications
2021-11-25 17:18:13 +01:00
sticky_history = "yes";
2023-07-27 09:16:16 +02:00
# 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
2021-11-25 17:18:13 +01:00
corner_radius = 5;
2023-07-27 09:16:16 +02:00
# Don't ignore the dbus closeNotification
ignore_dbusclose = false;
2021-11-25 17:18:13 +01:00
};
experimental = {
per_monitor_dpi = false;
};
urgency_low = {
2023-07-27 09:16:16 +02:00
background = "#141929fe";
foreground = "#dae1f2";
highlight = "#6fa6e7";
frame_color = "#272f57";
timeout = 8;
2021-11-25 17:18:13 +01:00
};
urgency_normal = {
2023-07-27 09:16:16 +02:00
background = "#141929fe";
foreground = "#dae1f2";
highlight = "#5ca1ff";
frame_color = "#272f57";
timeout = 8;
2021-11-25 17:18:13 +01:00
};
urgency_high = {
2023-07-27 09:16:16 +02:00
background = "#5ca1ffff";
highlight = "#fe6c5a";
foreground = "#1c2138";
frame_color = "#52426e";
2021-11-25 17:18:13 +01:00
timeout = 0;
};
};
};
};
}