You are not logged in.
To make the volume key on a ThinkPad T550 work, I set up .xbindkeysrc:
"pactl set-sink-mute 1 false; pactl set-sink-volume 1 -5%"
XF86AudioLowerVolume
"pactl set-sink-mute 1 false; pactl set-sink-volume 1 +5%"
XF86AudioRaiseVolume
"pactl set-sink-mute 1 toggle"
XF86AudioMute
After a recent Arch update, the keys stopped working, and I had to change the sink ID from 1 to 0.
How can a change of IDs be prevented for the future, and/or how can the configuration be made more reliable?
Offline
The help of pactl says to use a name, I suppose that should be more reliable than a numeric id unless some part of the name is variable.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Yep names should remain stable, they could potentially change if you switch your card profile around often, which usually isn't something you do often. If this is your default sink (and that shouldn't change even if you change the card profile) you could also use @DEFAULT_SINK@ as an identifier as opposed to a sink id or a sink name
Online
Thanks for the suggestions! Updated .xbindkeysrc to:
"pactl set-sink-mute @DEFAULT_SINK@ false; pactl set-sink-volume @DEFAULT_SINK@ -5%"
XF86AudioLowerVolume
"pactl set-sink-mute @DEFAULT_SINK@ false; pactl set-sink-volume @DEFAULT_SINK@ +5%"
XF86AudioRaiseVolume
"pactl set-sink-mute @DEFAULT_SINK@ toggle"
XF86AudioMute
"pactl set-source-mute @DEFAULT_SOURCE@ toggle"
XF86AudioMicMute
For the default microphone, I found that one can use @DEFAULT_SOURCE@. It all works fine now.
Offline