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
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:
parent
794b6e1fa7
commit
71054adbc3
1 changed files with 32 additions and 10 deletions
|
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue