Skip to content

Full-featured Linux utility to control backlight brightness

Notifications You must be signed in to change notification settings

geekylthyosaur/slight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slight

Full-featured Linux utility to control backlight brightness.

Build

  1. Install rustc & cargo.
  2. Clone this repository git clone https://github.com/geekylthyosaur/slight.git.
  3. Build using cargo build --release.
  4. Get the binary from target/release/slight.

Features

  • Precise Brightness Control: Just type your [INPUT], and now you have absolute control over your device's brightness. Set an exact value using n, or make incremental adjustments with +n or -n. Want a relative setting? Use percentages, like n%, or change it relatively with +n% or -n%. And guess what? The n can even be a floating-point number!

  • Device Selection: The --id <ID> option allows you to tailor the brightness to specific device. Easily identify and select device using the next feature.

  • Explore Available Devices: Curious about the devices at your disposal? Use --list [<LIST>...] to unveil all available devices or view specific ones by providing their IDs.

  • Illuminating Exponentials: Ever noticed how adjusting brightness from 0% to 5% feels like turning on a spotlight, while going from 95% to 100% is barely noticeable? It's all because of how our eyes work! But no worries, I've got your back with an awesome solution – introducing the --exponent [<EXPONENT>] option! Now, you can fine-tune brightness like a boss! This mode makes sure the brightness changes are consistent, making both the 0% to 5% and 95% to 100% transitions equally noticeable. Don't give any specific exponent? I've got the default value of 4.0 set up for you! So go ahead, play with those illuminating exponentials and enjoy the perfect glow!

  • Flexible Output Options: Choose your preferred destination for brightness adjustments. Whether you want to keep an eye on the changes in your terminal or utilize system file operations, we've got you covered with the --stdout option.

  • Toggle the Light: Sometimes, you just need a quick change. The --toggle [<TOGGLE>] option lets you switch between just two available values (0/1). No fuss, no complexity - just swift toggling. Moreover, we've enriched this feature with the ability to specify the possible values as on or off.

  • Insightful Verbose Mode: For those who crave knowledge, the --verbose option sheds light on every action the CLI takes. Stay informed and enjoy the transparency.

  • Helpful Assistance: Feeling a little lost? Use --help for a quick summary of the commands and options at your disposal.

  • Stay Updated: Wondering which version you're using? A quick --version will reveal the current version, keeping you informed and up-to-date.

Permissions

To set up udev rules to manage the kernel sysfs permissions, perform the following steps:

  1. Put the 90-backlight.rules file into /etc/udev/rules.d/ or any other location used to store udev rules on your system.
  2. Make sure that your user is part of the video group.
  3. Reload your udev rules or reboot.

Alternatively, the above steps are not required if your system uses elogind or systemd-logind as they provide a safe interface for unprivileged users to control device's brightness through dbus.

About

Full-featured Linux utility to control backlight brightness

Topics

Resources

Stars

Watchers

Forks

Languages