Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/luxPublic

POSIX Shell script to easily control brightness on backlight-controllers.

License

NotificationsYou must be signed in to change notification settings

Ventto/lux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LicenseVote for lux

Lux is a POSIX-compliant Shell script to control brightness

Perks

  • No requirement: POSIX-compliant (minimal:usermod, udevadm)
  • Lightweight: ~200 lines
  • Auto: Find the best max-brightness-value controller automatically
  • Threshold: Restrict brightness value with min/max relevant limits

Installation

Package Manager Utilities

$ pacman -S lux

Manually

  • Installlux:
$ git clone https://github.com/Ventto/lux.git$cd lux$ sudo make install
  • To control the brightness level, you need to setup the relevant group permissionspermanently.
    So first, runlux withsudo and then logout/login.

  • If you are in a hurry, you can directly get these permissions properly in a new shell:

$ newgrp video

Usage

Usage: lux OPERATION [-c CONTROLLER_NAME] [-m MIN] [-M MAX]Brightness option values are positive integers.Percent mode, add "%" after values (operation options only).Without option, it prints controller name and brightness info.Information:  -h  Prints this help and exits  -v  Prints version info and existsThresholds (can be used in conjunction):  -m MIN      Set the brightness MIN (raw value)  -M MAX      Set the brightness MAX (raw value)Operations (with percent mode):  -a VALUE[%]      Increase the brightness VALUE  -s VALUE[%]      Subtract the brightness VALUE  -S VALUE[%]      Set the brightness VALUE (thresholds will be ignored)  -g Print the current brightness raw value  -G Print the current brightness percentageControllers:  -c CONTROLLER_NAME      Set the controller to use.      Use any CONTROLLER_NAME in /sys/class/backlight.

Examples

  • Print information about brightness value:
$ lux/sys/class/backlight/nv_backlight 0;1000;2000# { current: 1000, max: 2000 }$ lux -g1000$ lux -G50%
  • Set the brightness value to zero (useful for pitchblack-shortcut):
$ lux -S 0
  • Increase the brightness:
$ lux -a 15%    (percentage)$ lux -a 15     (raw value)
  • Limit the value between [500;1999] and increase the brightness:
$ lux -g1990$ lux -m 500 -M 1999 -a 10$ lux -g1999
  • Set the backlight controller manually and set the brightness:
$ ls /sys/class/backlightintel_backlight$ lux -c intel_backlight -S 50

FAQ

The max is 2000. Setting the value from 1 to 500 seems to do nothing.

  • Set the minimum of 500:
$ lux -m 500 [OPTION]...

Pitch black when the brightness equals the maximum, how avoiding this ?

$ cat /sys/class/backlight/intel_backlight/max_brightness2000$ lux -M 1999 ...

Set the brightness value after initializing an X session ?

$echo"lux -S 75%">>$HOME/.xinitrc

About

POSIX Shell script to easily control brightness on backlight-controllers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp