You are not logged in.
Hello!
I'm trying to bind my multimedia keys to pulseaudio's volume control and am having issues. I have a script that runs the appropriate commands but trying to bind it to a keypress doesn't do anything. Here's the script,
step=1
if [ $1 == "raise" ]; then
pactl set-sink-volume @DEFAULT_SINK@ "+${step}%"
elif [ $1 == "lower" ]; then
pactl set-sink-volume @DEFAULT_SINK@ "-${step}%"
elif [ $1 == "mute" ]; then
pactl set-sink-mute @DEFAULT_SINK@ toggle
else
echo "Unrecognized parameter: ${1}"
echo "Usage should be: volume.sh <raise|lower|mute>"
fiand my .xbindkeysrc
"~/.config/hypr/volume.sh raise"
XF86AudioRaiseVolume
"~/.config/hypr/volume.sh lower"
XF86AudioLowerVolume
"~/.config/hypr/volume.sh mute"
XF86AudioMutexbindkeys -s returns what it should and the script runs normally when i run it in a shell. Any help is appreciated!
Last edited by peroxidesunflower (2025-12-27 23:15:04)
Offline
xbindkeys as the name suggests is for x11, use hyprlands built in keybind system
Offline
lol thanks so much. Here's the relevant section of my hyprland.conf for other newbs who want to copy.
$volumeup = ~/.config/hypr/volume.sh raise
$volumemute = ~/.config/hypr/volume.sh mute
$volumelower = ~/.config/hypr/volume.sh lower
bindle = ,XF86AudioRaiseVolume, exec, $volumeup
bindle = ,XF86AudioLowerVolume, exec, $volumelower
bindle = ,XF86AudioMute, exec, $volumemuteclosing the thread ![]()
Offline