You are not logged in.

#1 2026-04-06 12:19:14

doctordeity
Member
From: behind you
Registered: 2020-05-18
Posts: 7

[SOLVED] Notification Sounds on Swaync

Howdy!

So I am aware of this website:

https://catwithcode.moe/Blog/2023.10.27 … fects.html

But neither that hack nor anything suggested in the swaync config man page are helping me with this. I have tried the executable script and the sound-file and sound-name methods; both break my config and make it the default. Here's exactly what I have tried:

Executable method (the shell script simply plays the noise and it works fine):

"scripts": {
	"sound-script": {
		"exec": "bash /home/[user]/Scripts/notif.sh",
		"run-on": receive,
		"app-name": ".*"
	}
},

Sound-file and sound-name method:

"scripts": {
	"sound-script": {
		"sound-file": "/home/[user]/SFX",
		"sound-name": "youvegotmail.wav",
		"run-on": receive,
		"app-name": ".*"
	}
},

I don't understand why neither of these approaches work, and it's not giving me an error of why despite that particular setting being true. And, furthermore, it works on Sway with no issues.

Last edited by doctordeity (Yesterday 22:54:10)


“Humans cannot create anything out of nothingness. Humans cannot accomplish anything without holding onto something. After all, humans are not gods.”
– Kaworu Nagisa

Offline

#2 Yesterday 15:55:31

5hridhyan
Member
From: Asia
Registered: 2025-12-25
Posts: 501

Re: [SOLVED] Notification Sounds on Swaync

receive is unquoted; in JSON, strings must be wrapped in double quotes.... also, make sure your app-name regex is a string, for the sound settings: sound-file expects the full path to a single file, not a directory
if you use sound-file, you usually don’t need sound-name,also if you want all notifications to make a sound, using ".*" for app-name is correct, but if it’s still not working, you can try removing the app-name line entirely...


---

Offline

#3 Yesterday 22:41:48

doctordeity
Member
From: behind you
Registered: 2020-05-18
Posts: 7

Re: [SOLVED] Notification Sounds on Swaync

That and removing the app-name worked, thank you so much!


“Humans cannot create anything out of nothingness. Humans cannot accomplish anything without holding onto something. After all, humans are not gods.”
– Kaworu Nagisa

Offline

Board footer

Powered by FluxBB