From c4d96716c05c41a3b18f2326cb588cd19246da5f Mon Sep 17 00:00:00 2001 From: zachir Date: Fri, 12 Aug 2022 04:30:51 -0500 Subject: initial commit --- notify-sound.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 notify-sound.sh (limited to 'notify-sound.sh') diff --git a/notify-sound.sh b/notify-sound.sh new file mode 100755 index 0000000..84170d2 --- /dev/null +++ b/notify-sound.sh @@ -0,0 +1,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 -- cgit v1.2.3