stylix/testbed/modules/application: add notification progress bar (#2021)
Some checks failed
Check / aarch64-darwin (push) Has been cancelled
Check / aarch64-linux (push) Has been cancelled
Check / x86_64-darwin (push) Has been cancelled
Check / x86_64-linux (push) Has been cancelled
Label Merge Conflicts / conflicts (push) Has been cancelled
Documentation / docs (push) Has been cancelled

Link: https://github.com/nix-community/stylix/pull/2021

Reviewed-by: 0xda157 <da157@voidq.com>
This commit is contained in:
NAHO 2025-12-02 05:14:00 +01:00 committed by GitHub
parent 794b6e1fa7
commit 71054adbc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -119,17 +119,39 @@ in
name = "stylix-notification-check";
desktopName = "stylix-notification-check";
terminal = false;
exec = pkgs.writeShellScript "stylix-send-notifications" (
lib.concatMapStringsSep " && "
(
urgency: "${lib.getExe pkgs.libnotify} --urgency ${urgency} ${urgency} urgency"
)
exec =
lib.pipe
{
name = "stylix-send-notifications";
runtimeInputs = [ pkgs.libnotify ];
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 \
&
'')
[
"low"
"normal"
"critical"
]
}
wait
done
'';
}
[
"low"
"normal"
"critical"
]
);
pkgs.writeShellApplication
lib.getExe
];
};
}
)