From 6bdb9028af9a5256fbb47b942843e49aef7e3aa1 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 9 Apr 2018 22:42:45 +0800 Subject: Initial commit. --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..facdd2d --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# lightsd + +`lightsd` is a small daemon to make your ~~(actually, my)~~ ambient +light sensor on your laptop useful in a Linux interjection +desktop without using a full desktop environment (or `systemd`). + +This service watches the readings from the ambient light sensor and +control the backlight of the screen and keyboard. It also creates a +fifo so that you can adjust relative brightness of the lcd. + +The project also demostrates how damn stupid a C++ program could look like. + +# Warning +WIP. Does not yet do any kind of input sanitation. May segmentation fault +at any time. The author uses Gentoo. _Very_ shitty code. + +AS A DAEMON, IT ONLY RUNS AS ROOT! + +# Building +Building _requires_ C++17. Just `mkdir build && cd build && cmake .. && make`. + +# Documentation +None. The code documentes itself. + +## fifo usage +- `u ` +Makes lcd x% brighter. +- `d ` +Makes lcd x% darker. +- `s ` +Set relative brightness of lcd. +- `r` +Reset relative brightness of lcd, equivalent to `s 0`. + +The fifo is owned by `root:video` and has permission `0620` so that +everyone in the video group could potentially mess with your brightness. +Surprise! -- cgit v1.2.3