-
Notifications
You must be signed in to change notification settings - Fork 36
Usage with xob
i3-volume
can be used with xob (X Overlay Bar) to display volume notifications to the screen. While i3-volume
already has support for libnotify
compatible notification daemons, xob is not libnotify
compatible and thus cannot be used with the -n
option. However, we can use the -o
option and send the volume to xob and get the same functionality.
To start, you'll need to create a named pipe:
mkfifo /tmp/xobpipe
Now lets configure i3wm.
In your ~/.config/i3/config
append the following:
exec --no-startup-id tail -f /tmp/xobpipe | xob
The i3-volume
commands in your i3 config need to be modified. Choose one of the options below depending on your setup:
Based on the example PulseAudio configuration:
bindsym XF86AudioRaiseVolume exec $volumepath/volume -i $volumestep -t $statuscmd -u $statussig -o xob
bindsym XF86AudioLowerVolume exec $volumepath/volume -d $volumestep -t $statuscmd -u $statussig -o xob
bindsym XF86AudioMute exec $volumepath/volume -m -t $statuscmd -u $statussig -o xob
Based on the example amixer configuration:
bindsym XF86AudioRaiseVolume exec $volumepath/volume -a -i $volumestep -t $statuscmd -u $statussig -o xob
bindsym XF86AudioLowerVolume exec $volumepath/volume -a -d $volumestep -t $statuscmd -u $statussig -o xob
bindsym XF86AudioMute exec $volumepath/volume -am -t $statuscmd -u $statussig -o xob
It's important to note that exec
will not be executed when i3wm is reloaded (such as with mod+Shift+r
, so the tail
command that we added first will not run! You have to either completely restart your i3wm..
If you don't want to or are unable to restart your i3wm session, as a temporary workaround you can replace exec
with exec_always
, like this: exec_always --no-startup-id tail -f /tmp/xobpipe | xob
. Then reload with mod+Shift+r
. After reloading you should change exec_always
back to exec
or else you will end up with several of these commands running in the background!