From 9201c35f2c1a033d0928caadcd0440e15474cf82 Mon Sep 17 00:00:00 2001 From: paperbenni Date: Mon, 6 Jan 2020 18:00:27 +0100 Subject: [PATCH] add sound file to installer --- install.sh | 1 + programs/dunsttrigger | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index de1253b..07cfe2f 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/programs/dunsttrigger b/programs/dunsttrigger index a56606a..5a7d37b 100755 --- a/programs/dunsttrigger +++ b/programs/dunsttrigger @@ -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] $2 | $3" >>/tmp/notifications/notif.txt -- 2.11.0