From 6f84078759887dcc8f2662032eed1578206e0bb9 Mon Sep 17 00:00:00 2001 From: crapStone Date: Sat, 16 Jul 2022 14:10:40 +0200 Subject: [PATCH] improve readme, closes #2 --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index a56140f..6764663 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,46 @@ 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 + -d, --decrease Decreases brightness + -f, --full Sets brightness to highest value + -g, --get Prints current brightness value + -h, --help Print help information + -i, --increase Increases brightness + -l, --list Lists all available brightness and led controllers + -s, --set Sets brightness to given value + -t, --type choose controller type [default: lin] [possible values: raw, + lin, log] + -V, --version Print version information + -z, --zero Sets brightness to lowest value +``` + ## 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) + +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 +```