I3blocks volume in bar not updating automatically

lunes, junio 19, 2017 , 0 Comments

i3blocks is a highly flexible status line for the i3 window manager. It handles clicks, signals and language-agnostic user scripts.

The content of each block (e.g. time, battery status, network state, ...) is the output of a command provided by the user. Blocks are updated on click, at a given interval of time or on a given signal, also specified by the user.

It aims to respect the i3bar protocol, providing customization such as text alignment, urgency, color, and more.

Raising and lowering volume with those buttons works fine or not, but information in bar is not updating when volume is changed.

To fix that we need to edit config it's located inside ~/.config/i3 folder and add the next lines:


# volume
bindsym XF86AudioMute exec amixer set Master toggle;  exec pkill  -RTMIN+10 i3blocks
bindsym XF86AudioRaiseVolume exec amixer set Master 5%+; exec pkill  -RTMIN+10 i3blocks
bindsym XF86AudioLowerVolume exec amixer set Master 5%-; exec pkill  -RTMIN+10 i3blocks

# volume
bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+; exec pkill -RTMIN+10 i3blocks
bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%-; exec pkill -RTMIN+10 i3blocks
bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle; exec pkill -RTMIN+10
Now we have to check that configuration is fine, in this path we will edit the configuration for all users:

or just for one:

i3blocks -c /ruta/del/fichero
whatever we choose, we have to edit the volume tab [volume]:

the most important thing is the signal value may be identical for both files (config and i3blocks.conf), if doesn't will not work, in this case i chose 10.

Interval value must be ONCE, if "once" (or -1), the block will be executed only on startup (note that a click or signal will still trigger an update)

0 comentarios: