This is an old question, but an answer may help out others. I ran into an issue upon a fresh installation of i3wm
on my laptop where, for whatever reason, my XF86MonBrightnessUp/Down
keys weren't being registered (I checked with xev
). What I ended up doing is creating acpi
actions and events which corresponded to the keys being pressed.
The following are the actions/events I defined in /etc/acpi/actions
and /etc/acpi/events
, respectively:
Actions
/etc/acpi/actions/bl-down.sh
#!/bin/sh
bl_device=/sys/class/backlight/acpi_video0/brightness
echo $(($(cat $bl_device)-1)) | sudo tee $bl_device
/etc/acpi/actions/bl-up.sh
#!/bin/sh
bl_device=/sys/class/backlight/acpi_video0/brightness
echo $(($(cat $bl_device)+1)) | sudo tee $bl_device
Events
/etc/acpi/events/bl-down
event=video/brightnessdown BRTDN 00000087 00000000
action=/etc/acpi/actions/bl-down.sh
/etc/acpi/events/bl-up
event=video/brightnessup BRTUP 00000086 00000000
action=/etc/acpi/actions/bl-up.sh
You can verify your brightnessup/down acpi event codes by using acpi_listen
in your terminal and then pressing the relevant key combination (e.g., for me, it's Fn + Down Arrow for brightness down).
Finally, don't forget to restart acpid
with sudo /etc/init.d/acpid reload
Note: Your backlight device may be defined in a different location than /sys/class/backlight/acpi_video0
- that's just where mine happened to be. Do some poking around.
XF86MonBrightness(Up|Down)
? As in: "Did you check withxev
?" While these key symbols do exist, there are alsoXF86KbdBrightness(Up|Down)
. – Adaephon Nov 14 '16 at 21:21xmodmap -pke
and then somehow apply these in the i3 config. – warsong Aug 29 '17 at 16:16