i3 Window Manager – Control Screen Brightness

brightnessi3

I would like to control the screen brightness in i3, in Intel laptops that come with Fn keys for the purpose. These keys function with any other DE.

First making sure devices available are Intel:

$ ls -l /sys/class/backlight/
total 0
lrwxrwxrwx 1 root root 0 juin  24 18:26 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight

In another forum the programme xbacklight is suggested as means to control brightness in i3. However it fails in the laptops I tried so far:

$ xbacklight -inc 10
No outputs have backlight property

Is there any other way to control brightness in i3?

Best Answer

To change your screen brightness, you can use xrandr.

In order to do this, you can do:

xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1

That will return all the connected monitors (like LVDS-1 or DVI-D-0 for instance).

Now, to change the screen brightness do the command (replace the DVI-D-0 by the precedent command output):

xrandr --output DVI-D-0 --brightness 0.7

For instance, this command sets the brightness to 70%.

I hope it will help !

Related Question