Monday 3 August 2020

how to set brightness on i3wm

# Screen Brightness controls
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 2
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 2

how to set up brightness key on i3wm


Apabila tidak ada repon:

For this one I had to install the 'xbacklight' package. ((sudo) apt-get install xbacklight)

First off, test whether xbacklight works right out of the box by running

xbacklight -dec 10

If that works then skip to the i3 config step.

If that didn't work and you got an error such as "No outputs have backlight property" then I can help.

Start by running

xrandr --verbose

into your terminal. You should get a list of connected and disconnected in/outputs.

Find the one which is connected (Mine was called LVDS1) and find its Identifier code(Mine was 0x42)

We will use its identifier to adjust our xorg.conf file.

Before doing that we need to make sure that our system contains an intel_backlight folder. This folder should be located in the /sys/class/backlight/ directory. Run the following

ls /sys/class/backlight/

If you have an intel_backlight folder, great! So did I. If you do not then you may follow along but I cant promise my exact guidance will help you.

Now to edit our xorg.conf file.

nano /etc/X11/xorg.conf

If you do not have the file, then create it.

We will need to change the 'Identifier' code in this file. If your file is empty then copy my file.

Section "Device"
    Identifier  "*Your Identifier code*"
    Driver      "intel"
    Option      "Backlight"  "intel_backlight"
EndSection

Save this file, reboot, and try to run xbacklight -dec 10% once again. If you followed along then your screen should get more dim each time you run the command.

Share:

0 comments:

Post a Comment