In "Settings->Window Manager" I can customize keyboard shortcuts for actions such as window tiling or maximizing and minimizing windows. There is no option to control the volume with keyboard, though. It is possible in Cinnamon which has a similar control panel for keys but I don't know how to do it in Xfce.
Asked
Active
Viewed 1.3k times
2 Answers
12
I figured it out. Go to Settings->Keyboard->Application Shortcuts and bind the volume up and volume down keys you want to use to:
amixer set Master 5%+
amixer set Master 5%-
This will increase or decrease your volume by 5% depending on the key pressed.

yeti
- 323
5
The answer maybe duplicate this
As for pulseaudio, use pactl
command:
pactl -- set-sink-mute {SINK} toggle
-- mute/unmutepactl -- set-sink-volume {SINK} +10%
-- increase volume by 10%pactl -- set-sink-volume {SINK} +10%
-- decrease volume by 10%
where {SINK} in name/number of active sink. To find its value, try pactl list short sinks
. My output is
0 alsa_output.pci-0000_00_03.0.hdmi-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz RUNNING
we saw one SUSPENDED (0) versus one RUNNING (1) sink. So, use running sink's number in above commands

Timur Milovanov
- 151
pacmd set-default-sink $index
and can use the same index to adjust volume. – Martin Andersson Sep 22 '18 at 17:52