I am running i3wm and am setting up keybindings for it. I would like to use a set of keybindings to control the volume of my system.
I have set a key to:
exec pactl set-sink-mute 0 toggle
Pressing this key has no effect. I can however run
pactl set-sink-mute 0 toggle in my terminal and it works. However when run as root (
sudo pactl ...) it fails with:
Connection failure: Connection refused pa_context_connect() failed: Connection refused
However it acts as expected when called as a user.
FYI I am running arch linux.