You are not logged in.

#1 2025-12-27 21:08:39

peroxidesunflower
Member
Registered: 2024-07-21
Posts: 9

xbindkeys can't read .xbindkeysrc in Hyprland {SOLVED}

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>"
fi

and my .xbindkeysrc

"~/.config/hypr/volume.sh raise"
XF86AudioRaiseVolume

"~/.config/hypr/volume.sh lower"
XF86AudioLowerVolume

"~/.config/hypr/volume.sh mute"
XF86AudioMute

xbindkeys -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

#2 2025-12-27 21:20:44

system72
Member
Registered: 2025-11-22
Posts: 572
Website

Re: xbindkeys can't read .xbindkeysrc in Hyprland {SOLVED}

xbindkeys as the name suggests is for x11, use hyprlands built in keybind system

Offline

#3 2025-12-27 23:13:18

peroxidesunflower
Member
Registered: 2024-07-21
Posts: 9

Re: xbindkeys can't read .xbindkeysrc in Hyprland {SOLVED}

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, $volumemute

closing the thread smile

Offline

Board footer

Powered by FluxBB