pages-server/README.md

50 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2020-07-22 16:47:26 +00:00
# Lamp
Lamp is a backlight control program written in Rust and inspired by
[acpibacklight](https://gitlab.com/wavexx/acpilight).
2022-07-16 01:42:17 +00:00
2022-07-16 12:10:40 +00:00
## 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
-c, --controller <DEVICE> Select device to control
2022-07-16 12:10:40 +00:00
-d, --decrease <PERCENT> Decreases brightness
-f, --full Sets brightness to highest value
-g, --get Prints current brightness value
-h, --help Print help information
-i, --increase <PERCENT> Increases brightness
-l, --list Lists all devices with controllable brightness and led values
2022-07-16 12:10:40 +00:00
-s, --set <VALUE> Sets brightness to given value
-t, --type <controller_type> choose controller type [default: lin] [possible values: raw,
lin, log]
-V, --version Print version information
-z, --zero Sets brightness to lowest value
```
2022-07-16 01:42:17 +00:00
## Install
Binary packages for the following systems are currently available.
[![Packaging status](https://repology.org/badge/vertical-allrepos/lamp.svg)](https://repology.org/project/lamp/versions)
2022-07-16 12:10:40 +00:00
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
```