Skip to content

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

Merged
ErikReider merged 3 commits intoErikReider:mainfrom
earboxer:sound-hints
Jul 10, 2025
Merged

hints: parse sound-name and sound-file#477
ErikReider merged 3 commits intoErikReider:mainfrom
earboxer:sound-hints

Conversation

@earboxer
Copy link
Contributor

@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

Copy link
Owner

@ErikReider ErikReider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the massive delay, LGTM! :D

@ErikReider ErikReider merged commit 5d443ed into ErikReider:main Jul 10, 2025
5 checks passed
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.

2 participants