项目作者: Tethik

项目描述 :
Program to manipulate screen brightness on Linux using sysfs
高级语言: Go
项目地址: git://github.com/Tethik/backlight.git
创建时间: 2019-04-13T21:59:06Z
项目社区:https://github.com/Tethik/backlight

开源协议:GNU General Public License v3.0

下载


backlight

Program to manipulate screen brightness on Linux using sysfs.

  1. backlight. Simple program to control your backlights.
  2. Usage:
  3. backlight ls Lists all devices and their values
  4. backlight set <device> <val> Sets the brightness of a device to a specific value
  5. backlight dec <device> <val> Decreases the brightness of a device by a specific value
  6. backlight inc <device> <val> Increases the brightness of a device by a specific value
  7. backlight help Displays this help message :)

Install

For x64 you can download and install the released binary with the following script.

  1. wget https://github.com/Tethik/backlight/releases/download/1.0.0/backlight.0-x64
  2. chmod +x backlight.0-x64
  3. sudo mv backlight.0-x64 /usr/local/bin/backlight
  4. sudo setcap cap_dac_override+ep /usr/local/bin/backlight

Build from source

Requires that you have golang installed.

  1. git clone https://github.com/Tethik/backlight
  2. make
  3. sudo make install

Why sudo? To allow the program access to sysfs from a normal user the install script sets cap_dac_override.

i3 configuration

I originally built this for my own i3 setup. The following is the configuration I use to
bind the brightness keys on my laptop to run this backlight program.

  1. # Sreen brightness controls
  2. bindsym XF86MonBrightnessUp exec backlight inc intel_backlight 50
  3. bindsym XF86MonBrightnessDown exec backlight dec intel_backlight 50