diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-06-13 16:10:41 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-06-13 16:10:41 +0300 |
| commit | 7613b136fa621d541a2c17e6ad0f4069ae6dde6b (patch) | |
| tree | e3861c891be8208f6fa7879b38ecae2d9f4b207e /dunst-toggler-applet.sh | |
| parent | 8aa2ff1f9fd62514de8fad0ecd437bbea97a0f84 (diff) | |
| download | dotfiles-7613b136fa621d541a2c17e6ad0f4069ae6dde6b.tar dotfiles-7613b136fa621d541a2c17e6ad0f4069ae6dde6b.tar.gz dotfiles-7613b136fa621d541a2c17e6ad0f4069ae6dde6b.zip | |
Added an applet that can toggle dunst
Diffstat (limited to 'dunst-toggler-applet.sh')
| -rwxr-xr-x | dunst-toggler-applet.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dunst-toggler-applet.sh b/dunst-toggler-applet.sh new file mode 100755 index 0000000..e9f253e --- /dev/null +++ b/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" |
