All Projects → Ventto → lux

Ventto / lux

Licence: MIT license
POSIX Shell script to easily control brightness on backlight-controllers.

Programming Languages

shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to lux

swaystatus
A minimal executable for displaying sway status per second
Stars: ✭ 14 (-71.43%)
Mutual labels:  brightness, backlight
wluma
Automatic brightness adjustment based on screen contents and ALS
Stars: ✭ 290 (+491.84%)
Mutual labels:  brightness, backlight
funcd
Daemon for functional keys (works without X11)
Stars: ✭ 14 (-71.43%)
Mutual labels:  brightness, backlight
web pipe
One-way pipe, composable, rack application builder
Stars: ✭ 56 (+14.29%)
Mutual labels:  controller
nxbt
Control your Nintendo Switch through a website, terminal, or macro.
Stars: ✭ 340 (+593.88%)
Mutual labels:  controller
docker-zerotier-controller
Dockernized ZeroTierOne Controller
Stars: ✭ 170 (+246.94%)
Mutual labels:  controller
QuickCore
Delphi Core Framework to fast build desktop/mobile/web apps.
Stars: ✭ 84 (+71.43%)
Mutual labels:  controller
arch-pkgs
Management repo for my Arch Linux systems. Mirror of https://gitlab.com/mdaffin/arch-pkgs
Stars: ✭ 79 (+61.22%)
Mutual labels:  aur
TextFieldsTraversalController
A controller to manage the traversal of a collection of textfields.
Stars: ✭ 15 (-69.39%)
Mutual labels:  controller
android-tether
Autostart Android USB tethering with udev + systemd + adb
Stars: ✭ 30 (-38.78%)
Mutual labels:  udev
nest-abstract
NestJs Abstraction Helper
Stars: ✭ 36 (-26.53%)
Mutual labels:  controller
controller-rs
A kubernetes example controller
Stars: ✭ 134 (+173.47%)
Mutual labels:  controller
GlosSI
Tool for using Steam-Input controller rebinding at a system level alongside a global overlay
Stars: ✭ 1,004 (+1948.98%)
Mutual labels:  controller
notion-repackaged
notion executables with the notion-enhancer embedded & a vanilla port of the official app to linux
Stars: ✭ 733 (+1395.92%)
Mutual labels:  aur
terraform-operator
A Kubernetes CRD to handle terraform operations
Stars: ✭ 204 (+316.33%)
Mutual labels:  controller
ContainerView
Using Container View in iOS with Swift
Stars: ✭ 34 (-30.61%)
Mutual labels:  controller
PKGBUILD
PKGBUILDs; almost all on the AUR
Stars: ✭ 16 (-67.35%)
Mutual labels:  aur
Xb2XInput
XB2X: User-mode Windows driver for Xbox OG controllers, supporting both XInput and DirectInput.
Stars: ✭ 70 (+42.86%)
Mutual labels:  controller
constyble
CSS complexity linter
Stars: ✭ 92 (+87.76%)
Mutual labels:  threshold
jest-it-up
🌐📈 Automatically bump up global Jest thresholds whenever coverage goes above them
Stars: ✭ 37 (-24.49%)
Mutual labels:  threshold

Lux

License Vote 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

  • Install lux:
$ 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 permissions permanently.
    So first, run lux with sudo 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 exists

Thresholds (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 percentage

Controllers:
  -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 -g
1000

$ lux -G
50%
  • 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 -g
1990

$ lux -m 500 -M 1999 -a 10

$ lux -g
1999
  • Set the backlight controller manually and set the brightness:
$ ls /sys/class/backlight
intel_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_brightness
2000
$ lux -M 1999 ...

Set the brightness value after initializing an X session ?

$ echo "lux -S 75%" >> $HOME/.xinitrc
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].