summaryrefslogtreecommitdiff
path: root/notify-sound.sh
blob: a524a5a173ce9915205f3e753b9f47577ace892a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
SILENT_FILE="/tmp/notify-sound-silent"
case "$1" in
  "on")
    rm -rf "$SILENT_FILE"
    notify-send "Notification sound on"
    [ ! -f "$SILENT_FILE" ] && paplay ~/.local/share/sounds/notification.wav
    ;;
  "off")
    touch "$SILENT_FILE"
    notify-send "Notification sound off"
    ;;
  *)
    [ ! -f "$SILENT_FILE" ] && paplay ~/.local/share/sounds/notification.wav
    ;;
esac