https://codeberg.org/crapstone/lamp
A linux backlight utility inspired by acpibacklight
https://codeberg.org/crapstone/lamp
rust rust-lang woodpecker woodpecker-ci
Last synced: 6 days ago
JSON representation
A linux backlight utility inspired by acpibacklight
- Host: codeberg.org
- URL: https://codeberg.org/crapstone/lamp
- Owner: crapStone
- Created: 2021-08-22T13:29:50.000Z (about 4 years ago)
- Default Branch: main
- Last Synced: 2023-11-08T14:43:53.555Z (almost 2 years ago)
- Topics: rust, rust-lang, woodpecker, woodpecker-ci
- Language:
- Homepage:
- Size: 532 KB
- Stars: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lamp
[](https://ci.codeberg.org/crapStone/lamp)
[](https://crates.io/crates/lamp)Lamp is a backlight control program written in Rust and inspired by
[acpibacklight](https://gitlab.com/wavexx/acpilight).## Features
In contrast to acpilight lamp is not backwards compatible with xbacklight.
It is intended to be used as a standalone replacement for new scripts.```none
Commands:
set Sets brightness to given value
inc Increase brightness
dec Decrease brightness
get Prints current brightness value
zero Sets brightness to lowest value
full Sets brightness to highest value
help Print this message or the help of the given subcommand(s)Options:
-l, --list Lists all devices with controllable brightness and led values
-c, --controller Select device to control, defaults to the first device found
-t, --type choose controller type [default: lin] [possible values: raw, lin, log]
-h, --help Print help (see a summary with '-h')
-V, --version Print version information
```## Install
Binary packages for the following systems are currently available.
[](https://repology.org/project/lamp/versions)
You can also install it via `cargo`:
```bash
cargo install lamp
```You have to make sure, that you have write access to `/sys/class/backlight/`.
This can be achieved by using udev rules like `90-backlight.rules` in this repo.## Build
lamp is a pure Rust project so you can simply run `cargo build` after installing the Rust toolchain.
Formatting is done via `cargo fmt` with the default rules and in the pipeline `clippy` is run with the following arguments:
```bash
cargo clippy -- --deny clippy::all --deny warnings
```