Last active
May 17, 2024 15:49
-
-
Save croddy/134780bb8dbe259c12fa to your computer and use it in GitHub Desktop.
unbreak your X11 bell with pulseaudio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # allegedly these bits can be done in a per-user default.pa, but i could not | |
| # get it to work | |
| pactl upload-sample /home/cmr/sounds/bells/soothingbell.wav soothingbell | |
| pactl load-module module-x11-bell sample=soothingbell | |
| # the default bell volume on my system is very quiet, but you should adjust this | |
| xset b 100 | |
| # ...but the default output volume on my system is very loud. allegedly this can | |
| # also be done in default.pa, but i could not get it to work even with pactl. | |
| amixer -D pulse sset Master 50% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, i keep coming back to this.
btw, i tried to add this to default.pa and failed shamefully until i read the
pulse-cli-syntax (5)manpage. the default.pa syntax isn't consistent with the pactl syntax for some weird reason.i ended up adding the following to default.pa
load-sample here, upload-sample in pactl, god knows why :| Also the argument order is the opposite.
this at first failed and i almost gave up at that point, checking /var/log/syslog I realised that i had left a few whitespace characters after the filename and that was being parsed as part of the filename (as if the file was called 'message.oga '). trimming that fixed it and now i get a nice bell from startup (even before logging in, in the display manager login prompt)
cheers!