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