SwayNotificationCenter
SwayNotificationCenter copied to clipboard
hints: parse sound-name and sound-file
On mobile devices, it can be helpful to play the audio sound indicated by the notification's hint.
This allows for minimal audio-capabilities (without including another library).
Example config:
{
"scripts": {
"sound-name": {
"exec": "sh -c 'mpv --really-quiet /usr/share/sounds/freedesktop/stereo/$SWAYNC_SOUND_NAME.oga'",
"sound-name": "."
},
"sound-file": {
"exec": "sh -c 'mpv --really-quiet \"$SWAYNC_SOUND_FILE\"'",
"sound-file": "."
}
}
}
run notify-send "Where am I?" -h STRING:sound-name:audio-channel-front-right
or notify-send "Where am I?" -h STRING:sound-file:/usr/share/sounds/freedesktop/stereo/audio-channel-front-left.oga
(Similar to https://github.com/emersion/mako/pull/470)
See also #58