regolith-i3xrocks-config
regolith-i3xrocks-config copied to clipboard
Fix i3xrocks volume blocklet
The screenshot says it all.
Most likely, the volume widget is either set to another device or tries to query a different sound system.
Broken as in the screenshot for me too, on a clean Ubuntu 20.04 + PPA, for at least two reasons:
- The script uses
amixer
, which does not automatically control the same device ('card') as the 'Output Device' in Gnome. If you're lucky it might; in my caseasound
defaulted to a S/PDIF device, and doesn't update when I plug my headphones in. A hacky fix is to set the default device in /etc/asound.conf. - The
amixer
output format isn't as expected, even if the right card is chosen. The equivalent volume script in i3blocks-contrib gets this right. So, for instance, if Idpkg -P i3xrocks-volume; apt install i3blocks; cp -a /usr/share/i3blocks/volume /usr/share/i3xrocks/volume
I get a working volume control.
Given the widget's limitations, a useful enhancement is to launch the Gnome control panel at the Sound tab when the volume is clicked:
case $BLOCK_BUTTON in
1) /usr/bin/i3-msg -q exec /usr/bin/gnome-control-center sound;;
I'm sort of drawn towards removing anything but Pulseaudio support for the blocklet, to make sure we're on-par with the GNOME dialog here. Any objections? Pulseaudio has been the default audio system for Ubuntu since ages, and folks that want to use a different system (e.g. JACK) or remove it completely are likely skilled enough to also integrate their own blocklet for volume management .. ?
@moritzheiber Totally makes sense to me. This is the advantage of building the Ubuntu-specific i3 version: you have to cover fewer variations.
What's the status of this PR @moritzheiber ?
@kgilmer Ugh, sorry, this vanished off my radar. I'll rewrite the volume
blocklet next (and add tests!). I'm also moving this issue to https://github.com/regolith-linux/regolith-i3xrocks-config
Any progress @moritzheiber? I just added the volume blocklet to my setup, and it displays correctly until I change the output device in the Gnome control center sound settings. Also for me the actions don't work.