regolith-i3xrocks-config icon indicating copy to clipboard operation
regolith-i3xrocks-config copied to clipboard

Fix i3xrocks volume blocklet

Open grzkv opened this issue 4 years ago • 6 comments

The screenshot says it all. image

Most likely, the volume widget is either set to another device or tries to query a different sound system.

grzkv avatar Apr 26 '20 09:04 grzkv

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 case asound 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 I dpkg -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;;

jefft avatar Apr 27 '20 11:04 jefft

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 avatar May 22 '20 18:05 moritzheiber

@moritzheiber Totally makes sense to me. This is the advantage of building the Ubuntu-specific i3 version: you have to cover fewer variations.

grzkv avatar May 22 '20 21:05 grzkv

What's the status of this PR @moritzheiber ?

kgilmer avatar Aug 30 '20 23:08 kgilmer

@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

moritzheiber avatar Jan 02 '21 14:01 moritzheiber

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.

nated0g avatar Apr 28 '21 17:04 nated0g