diff options
| author | Syndamia <kamen@syndamia.com> | 2022-07-19 11:33:00 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2022-07-19 11:33:00 +0300 |
| commit | fdcd93a83cc66b2b475b76beb5f87e50e0483e9f (patch) | |
| tree | 7af56bc5ca1006b32802e7ca8d15b28ca74cc347 /scripts/dunst-toggler-applet.sh | |
| parent | b526d5c377ffe3ee38949ee6728377981578d190 (diff) | |
| download | dotfiles-fdcd93a83cc66b2b475b76beb5f87e50e0483e9f.tar dotfiles-fdcd93a83cc66b2b475b76beb5f87e50e0483e9f.tar.gz dotfiles-fdcd93a83cc66b2b475b76beb5f87e50e0483e9f.zip | |
Moved scripts to their own folder and renamed .cfgs folder to .confs
Diffstat (limited to 'scripts/dunst-toggler-applet.sh')
| -rwxr-xr-x | scripts/dunst-toggler-applet.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/dunst-toggler-applet.sh b/scripts/dunst-toggler-applet.sh new file mode 100755 index 0000000..e9f253e --- /dev/null +++ b/scripts/dunst-toggler-applet.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +function update { + while :; do + curr_status=$(dunstctl is-paused) + + if [[ "$curr_status" != "$prev_status" ]]; then + prev_status=$curr_status + + if [[ "$curr_status" == "true" ]]; then + echo icon:/usr/share/icons/tabler-icon-bell-off.png + echo tooltip:Notifications OFF + else + echo icon:/usr/share/icons/tabler-icon-bell.png + echo tooltip:Notifications ON + fi + fi + + sleep 0.2 + done +} + +update | \ +yad --notification \ + --listen \ + --command="dunstctl set-paused toggle" |
