1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/configs/dunst.nix

67 lines
1.7 KiB
Nix
Raw Normal View History

2022-03-10 21:52:12 +01:00
{
lib,
2022-03-10 21:52:12 +01:00
pkgs,
...
2025-12-27 22:22:54 +01:00
}:
let
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
2025-12-27 22:22:54 +01:00
in
{
environment.systemPackages = [
(pkgs.writers.writeDashBin "notifications" ''
${pkgs.dunst}/bin/dunstctl history \
| ${pkgs.jq}/bin/jq -r '
.data[]
| map("${sgr "90" ''\(.appname.data)''} ${sgr "1" ''\(.summary.data)''} ${sgr "31" ''\(.body.data | gsub("\n"; " | "))''}")
| join("\n")'
'')
];
2019-04-19 03:11:51 +02:00
home-manager.users.me.services.dunst = {
enable = true;
iconTheme = pkgs.lib.niveum.theme.icon;
2019-04-19 03:11:51 +02:00
settings = {
global = {
transparency = 10;
geometry = "200x5-30+20";
follow = "mouse";
indicate_hidden = true;
notification_height = 0;
separator_height = 2;
padding = 8;
horizontal_padding = 8;
sort = true;
markup = "full";
2020-06-10 17:37:25 +02:00
format = "%a\\n<b>%s</b>\\n%b";
2019-04-19 03:11:51 +02:00
alignment = "left";
show_age_threshold = 60;
bounce_freq = 0;
word_wrap = true;
ellipsize = "middle";
ignore_newline = false;
stack_duplicates = true;
hide_duplicate_count = false;
max_icon_size = 32;
sticky_history = true;
history_length = 20;
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
browser = lib.getExe pkgs.niveum-browser;
2019-04-19 03:11:51 +02:00
verbosity = "mesg";
corner_radius = 0;
mouse_left_click = "do_action";
mouse_right_click = "close_current";
mouse_middle_click = "close_all";
};
2023-07-26 07:38:52 +02:00
urgency_low = {
2019-04-19 03:11:51 +02:00
timeout = 5;
};
2023-07-26 07:38:52 +02:00
urgency_normal = {
2019-04-19 03:11:51 +02:00
timeout = 10;
};
2023-07-26 07:38:52 +02:00
urgency_critical = {
2019-04-19 03:11:51 +02:00
timeout = 0;
};
};
};
}