Crates.io | gamma_daemon |
lib.rs | gamma_daemon |
version | 0.2.1 |
source | src |
created_at | 2023-06-30 18:24:42.72744 |
updated_at | 2023-09-24 03:58:08.079471 |
description | Changes screen brightness based on notebook battery life |
homepage | https://github.com/trollLemon/GammaDaemon |
repository | https://github.com/trollLemon/GammaDaemon |
max_upload_size | |
id | 904853 |
size | 40,767 |
Auto adjusts screen gamma based on notebook battery life for Linux systems.
GammaDaemon should work with any Linux laptop.
AC detection: Working
Screen brightness change: Working
Run either of the following:
cargo install gamma_daemon
cargo install --path ./
If you do the above method, it has to be in the root folder.
First, run
cargo build --release
Then copy the binary to where you want to put it; For example, in /usr/bin/:
$ cp target/release/gamma_daemon /usr/bin/
To run GammaDaemon without running as root, create a udev rule that will allow users in a certain group to read and write to /sys/class/backlight/(backlight)/brightness. For example, udev rules for users in the video group listed in the documentation for bulbb:
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
For more information, see the bulbb documentation.
GammaDaemon is configured in a .toml file. You can specify where to find the config file in a command argument:
gamma_daemon /home/<USER>/config.toml
If no config path is provided, GammaDaemon will look in $USER/.config/GammaDaemon/conf.toml for gamma configurations. If GammaDaemon cannot find this file, it will use a default configuration. Here is an example config:
full = 240
low = 100
low_perc = 25 # out of 100
charging = 255
discharging = 134
unknown = 255
ac_in = 255
Any contributions and testing are welcome. Just make a pull request with the changes you want to add.
If you tested this software on a device not listed in the Compatibility section, add the device to the Devices Tested list.