diff options
author | Yigit Sever | 2021-10-08 00:05:34 +0300 |
---|---|---|
committer | Yigit Sever | 2021-10-08 00:05:34 +0300 |
commit | 75d6e605a64d2f862942afb57f1ff5668d60ae52 (patch) | |
tree | 8d9da281e33f1f58b5e5d063ec0de4e9a3777cb4 /.local/bin/toggle_notifications.sh | |
parent | 0287e6b35edab6c2694a8c59f5a5195e0de13014 (diff) | |
download | dotfiles-75d6e605a64d2f862942afb57f1ff5668d60ae52.tar.gz dotfiles-75d6e605a64d2f862942afb57f1ff5668d60ae52.tar.bz2 dotfiles-75d6e605a64d2f862942afb57f1ff5668d60ae52.zip |
bin: track bunch of scripts
Diffstat (limited to '.local/bin/toggle_notifications.sh')
-rwxr-xr-x | .local/bin/toggle_notifications.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.local/bin/toggle_notifications.sh b/.local/bin/toggle_notifications.sh new file mode 100755 index 0000000..9b700b5 --- /dev/null +++ b/.local/bin/toggle_notifications.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | TOGGLE=$HOME/.local/share/.pause_notifications | ||
4 | |||
5 | if [ ! -e $TOGGLE ]; then | ||
6 | touch $TOGGLE | ||
7 | dunstify --appname="notifications" --icon="chronometer-pause" "pausing" -u low | ||
8 | sleep 3 | ||
9 | killall -SIGUSR1 dunst # pause | ||
10 | else | ||
11 | rm $TOGGLE | ||
12 | killall -SIGUSR2 dunst # resume | ||
13 | dunstify --appname="notifications" --icon="chronometer-start" "here's what happened" -u low | ||
14 | fi | ||