README.txt (976B)
1 volume.sh 2 ========= 3 4 Shell script that outputs your current volume level to stdout for i3blocks 5 and uses sxalert as a dumb OSD to display it. 6 7 In /etc/i3blocks.conf: 8 9 [volume] 10 command=~/.scripts/volume #path to script 11 label=V #label 12 interval=once 13 signal=10 14 15 In ~/.config/sxh 16 17 XF86Audio{Raise,Lower}Volume 18 pactl set-sink-volume @DEFAULT_SINK@ {+10%, -10%} \ 19 && pkill -SIGRTMIN+10 i3blocks 20 21 alt + XF86Audio{Raise,Lower}Volume 22 pactl set-sink-volume @DEFAULT_SINK@ {+1%, -1%} \ 23 && pkill -SIGRTMIN+10 i3blocks 24 25 XF86AudioMute 26 pactl set-sink-mute @DEFAULT_SINK@ toggle \ 27 && pkill -SIGRTMIN+10 i3blocks 28 29 30 This way, input from your volume keys sends a SIG 10 to i3blocks, and it 31 redraws the audio on the status bar, along with displaying the alert. 32 33 notes 34 ----- 35 36 sxalert processes are killed and dedrawn. Thus, this is not the most smooth 37 OSD, as the Xwindow flickers between redraws. It works fine, however.