11.stylix/modules/dunst/hm.nix
awwpotato 7ffb31da69
treewide: use mkTarget (batch 2) (#1362)
Link: https://github.com/nix-community/stylix/pull/1362

Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-05-23 19:23:39 +02:00

50 lines
1.1 KiB
Nix

{ mkTarget, lib, ... }:
mkTarget {
name = "dunst";
humanName = "Dunst";
configElements = [
(
{ fonts }:
{
services.dunst.settings.global.font =
"${fonts.sansSerif.name} ${toString fonts.sizes.popups}";
}
)
(
{ colors, opacity }:
{
services.dunst.settings =
with colors.withHashtag;
let
dunstOpacity = lib.toHexString (
((builtins.floor (opacity.popups * 100 + 0.5)) * 255) / 100
);
in
{
global = {
separator_color = base02;
};
urgency_low = {
background = base01 + dunstOpacity;
foreground = base05;
frame_color = base0B;
};
urgency_normal = {
background = base01 + dunstOpacity;
foreground = base05;
frame_color = base0E;
};
urgency_critical = {
background = base01 + dunstOpacity;
foreground = base05;
frame_color = base08;
};
};
}
)
];
}