Issue with brightness keys

Hi all,

Today I installed BSPWM. All good, still learning about it, but atm main issue is with brightness keys.

F2/F3 doesnt work. Same with FN combo.

I tried this :
pacman -S acpilight

to get it working from terminal with the command :
sudo xbacklight -dec 20

Next one :

*> [marko@marko-hpenvyx360convertible13ar0xxx ~]$ xmodmap -pke | grep Bright*
*> keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown*
*> keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp*
*> keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown*
*> keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp*
*> keycode 251 = XF86MonBrightnessCycle NoSymbol XF86MonBrightnessCycle*

I dont know what to do next. Same issue I had with i3.

F2/ F3 combo working on other DE.

About my hardware :

Thank you in advance,

If you can do what you want with a terminal command, then you should be able to set up a keybinding for it. Are you using sxkhd?


Add something like this to the sxhkdrc file:

sudo xbacklight -dec 20

I added it , reseted BSPWM , but nothing happened.

In sxhkdrc file I already have this :

# Brightness up
  xbacklight -inc 5

# And brightness down
  xbacklight -dec 5


Does entering the xbacklight -dec 5 command in the terminal lower the lighting like you want?

yes, it does

I would use the sxhkdrc file to bind that to some key combo then. It’s possible that the F2 I had you use before wasn’t correct. I’m not on a bspwm machine at the moment to check. Try something like:

alt + shift + b
xbacklight -dec 5

To test that the keybinding works and then we can work to update the alt + shift + b part to use the F2/F3 key like you really want.

sorry it took me longer, because I tried to theme my bspwm and I needed to install it again…hehe

about this, I added this to sxhkdrc file, restarted bspwm and nothing… no respond

Not sure if at this point I’m digging up an old thread or taking forever to respond, but…

If you can get that key combo to do something else (open your normal terminal, for example) and the xbacklight -dec 5 command in the terminal does the backlight change you want it to, then we know the keybinding works and the command works, so I have no idea why they wouldn’t work when put together.

1 Like

I dont know… hehe…

I am thinking to make a script for inc/dec brightness, and then bind them to key combo.

But yeah, first need to google how to do it…

Or even switch from bspwm to xfce/i3…

Still exploring my options :wink: