Skip to content

Commit

Permalink
Find sound file in all possible locations for freedesktop DEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
poetaman committed Oct 5, 2022
1 parent 629a60f commit 937d380
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/arttime
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ function notifydesktop {
local notifystr="display notification \"$notifymessage\" with title \"$notifytitle\" subtitle \"$notifysubtitle\" sound name \"Blow\""
osascript -e $notifystr 2>/dev/null
elif [[ $machine = "Linux" || $machine = "BSD" ]]; then
paplay /usr/share/sounds/freedesktop/stereo/message-new-instant.oga 2>/dev/null &
read -r freedesk_message_sound <<(print -rC1 -- ${(s[:])^XDG_DATA_DIRS}/sounds/freedesktop/stereo/message-new-instant.oga(ND))
[[ -n $freedesk_message_sound && -e $freedesk_message_sound ]] && paplay $freedesk_message_sound 2>/dev/null &
notify-send -u critical $notifytitle "$notifysubtitle\r$notifymessage" 2>/dev/null
fi
}
Expand Down

0 comments on commit 937d380

Please sign in to comment.