Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hints: parse sound-name and sound-file #477

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

earboxer
Copy link

@earboxer earboxer commented Sep 8, 2024

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 emersion/mako#470)

See also #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant