OSDN Git Service

add sound file to installer
authorpaperbenni <paperbenni@gmail.com>
Mon, 6 Jan 2020 17:00:27 +0000 (18:00 +0100)
committerpaperbenni <paperbenni@gmail.com>
Mon, 6 Jan 2020 17:00:27 +0000 (18:00 +0100)
install.sh
programs/dunsttrigger

index de1253b..07cfe2f 100755 (executable)
@@ -233,6 +233,7 @@ mkdir -p paperbenni/notifications &>/dev/null
 # gets executed by dunst on notification
 curl "https://raw.githubusercontent.com/paperbenni/suckless/master/programs/dunsttrigger" >~/paperbenni/notifications/dunsttrigger
 chmod +x ~/paperbenni/notifications/dunsttrigger
+wget -O notification.ogg "https://notificationsounds.com/notification-sounds/me-too-603/download/ogg"
 
 # automatic wallpaper changer
 # uses reddit r/wallpaper scraper
index a56606a..5a7d37b 100755 (executable)
@@ -1,3 +1,10 @@
 #!/bin/dash
-mpv ~/paperbenni/notification.ogg
+# gets executed each time dunst receives a notification
+
+# spotify doesnt need a sound
+# discord already has one
+if ! grep -Eq '(discord|spotify)' <<<"$1"; then
+    mpv ~/paperbenni/notification.ogg
+fi
+
 echo "($(date +%H:%M)) [$1] <b>$2</b> | <i>$3</i>" >>/tmp/notifications/notif.txt