gradular volume control
bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
mute
#bindsym XF86AudioMute exec amixer sset Master toggle && killall -USR1 i3blocks
#mute
bindsym XF86AudioMute exec pamixer -t && notify-send “mute: $(pamixer --get-mute)”
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
What I don’t understand is that normally there is a $mod+p or whatever, and this is the key combo that is mapped to the function. However I can’t see this in these examples. What am I missing? I keep getting errors when I add a $mod+p or whatever into those lines.
Hi @dongdong
XF86Audio… = linked to multimedia buttons/key’s on the keyboard. You don’t need mod+ for this.
When the keyboard has no multimedia key’s, like mine, i have to change it to another keybinding, like mod+key to change volume etc.
By the way. Welcome on the forum.
my example / amixer though. but same idea.
bindsym $mod+F9 exec --no-startup-id amixer set Master 5%+ # increase volume
bindsym $mod+F8 exec --no-startup-id amixer set Master 5%- # decrease volume
bindsym $mod+F10 exec --no-startup-id amixer set Master toggle # mute sound
edit ::: 1 – adding key search tool.
Showkey shows the keybindings of key’s.
$ showkey -a
5 Likes
Hey Eric - thanks for this. I got mixed, I thought XF86Audio was some kind of audio program itself.
Cheers for clearing it up for me : )
1 Like
welcome at the purple side and at i3 too 
The audio keys are also not present on all devices… but you can change everything in config to fit your needs and system, if something is not working ask about.
1 Like