dunst: set icon theme (#2201)
Closes: https://github.com/nix-community/stylix/issues/1948 Link: https://github.com/nix-community/stylix/pull/2201 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
801843d10e
commit
1bc90aa37f
2 changed files with 33 additions and 9 deletions
|
|
@ -43,5 +43,16 @@ mkTarget {
|
|||
};
|
||||
}
|
||||
)
|
||||
(
|
||||
{ polarity, icons }:
|
||||
{
|
||||
services.dunst = {
|
||||
iconTheme = {
|
||||
inherit (icons) package;
|
||||
name = if polarity == "dark" then icons.dark else icons.light;
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,15 +128,28 @@ in
|
|||
text = ''
|
||||
for percent in {0..100}; do
|
||||
${lib.concatMapStrings
|
||||
(urgency: ''
|
||||
notify-send \
|
||||
--hint="int:value:$percent" \
|
||||
--hint=string:x-dunst-stack-tag:${urgency} \
|
||||
--urgency ${urgency} \
|
||||
${urgency} \
|
||||
urgency \
|
||||
&
|
||||
'')
|
||||
(
|
||||
urgency:
|
||||
let
|
||||
icon =
|
||||
{
|
||||
low = "dialog-information.svg";
|
||||
normal = "dialog-warning.svg";
|
||||
critical = "dialog-error.svg";
|
||||
}
|
||||
.${urgency};
|
||||
in
|
||||
''
|
||||
notify-send \
|
||||
--hint="int:value:$percent" \
|
||||
--hint=string:x-dunst-stack-tag:${urgency} \
|
||||
--icon ${pkgs.papirus-icon-theme}/share/icons/Papirus/32x32/status/${icon} \
|
||||
--urgency ${urgency} \
|
||||
${urgency} \
|
||||
urgency \
|
||||
&
|
||||
''
|
||||
)
|
||||
[
|
||||
"low"
|
||||
"normal"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue