Lightwave is a lightweight command-line tool designed to manage screen brightness on Linux systems. Written in Rust, Lightwave allows users to easily adjust the brightness of their screens through a clean and efficient interface.
Features:
- View current brightness level.
- Set a new brightness level within the allowable range.
- Increase or decrease brightness by a specified amount.
- Simple and intuitive command usage.
Lightwave supports single backlight devices typically found on most Linux distributions, including Arch Linux. It provides a straightforward way to control screen brightness from the terminal.
To build and install Lightwave, you'll need to have Rust installed. Follow these steps:
-
Clone the repository:
git clone https://github.com/monikeo281000/lightwave.git cd lightwave
-
Build the project:
cargo build --release
-
Install the tool
sudo cp target/release/lightwave /usr/local/bin/
-
Run the tool (you may need sudo to adjust brightness):
sudo lightwave [option]
Lightwave provides several commands to control screen brightness. You may need sudo to adjust the brightness.
-
View the current brightness level
lightwave get
-
View the maximum allowable brightness level
lightwave get-max
-
Set a new brightness level
sudo lightwave set <value>
-
Increase the brightness by a specified amount
sudo lightwave increase <value>
-
Decrease the brightness by a specified amount
sudo lightwave decrease <value>
Where is the amount to decrease the brightness by.
For more information and additional commands
lightwave --help
To integrate Lightwave with Hyprland for brightness control via keyboard shortcuts, add the following lines to your Hyprland configuration file:
binde = , XF86MonBrightnessUp, exec, lightwave increase 4
binde = , XF86MonBrightnessDown, exec, lightwave decrease 4
These bindings will allow you to increase or decrease the brightness using the respective function keys.
bind supports flags in this format
e -> repeat, will repeat when held.
If you encounter permission issues when trying to control the brightness, please check the ownership and permissions of the Lightwave binary
-
Check ownership and permissions
ls -l /usr/local/bin/lightwave
Ensure the owner is root and the permissions are set correctly
-
Set the correct permissions
sudo chown root:root /usr/local/bin/lightwave sudo chmod u+s /usr/local/bin/lightwave
This sets the setuid bit, allowing the binary to run with root privileges.
-
If the issue persists
sudo chmod u+x /usr/local/bin/lightwave
This ensures the binary is executable.
Lightwave is licensed under the MIT License. See the LICENSE file for more information.