nix/package/swayscript/script/Notify.nix

23 lines
444 B
Nix
Raw Normal View History

2024-11-22 18:44:10 +03:00
{
__findFile,
pkgs,
...
}: {
text = ''
function notify() {
[[ "''$(dndstate)" = "Y" ]] && return
${pkgs.pipewire}/bin/pw-cat -p ${<static/Notification.ogg>} &
}
function notify_short() {
[[ "''$(dndstate)" = "Y" ]] && return
${pkgs.pipewire}/bin/pw-cat -p ${<static/Short.ogg>} &
}
function notify_long() {
[[ "''$(dndstate)" = "Y" ]] && return
${pkgs.pipewire}/bin/pw-cat -p ${<static/Long.ogg>} &
}
'';
}