aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md40
1 files changed, 34 insertions, 6 deletions
diff --git a/README.md b/README.md
index 35d6ae2..368e5d6 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,9 @@
# lightsd
`lightsd` is a small daemon to make your ~~(actually, my)~~ ambient
-light sensor on your laptop useful in a Linux <sup>interjection</sup>
-desktop without using a full desktop environment (or `systemd`).
+light sensor on your laptop useful in Linux <sup>interjection</sup>
+without using a full desktop environment (or `systemd`). It even works
+in a tty!
This service watches the readings from the ambient light sensor and
control the backlight of the screen and keyboard. It also creates a
@@ -21,11 +22,21 @@ at any time. The author uses Gentoo. _Very_ shitty code.
As this daemon manipulates sysfs, IT ONLY RUNS AS ROOT!
+# Dependencies
+ - CMake
+ - Reasonable new gcc or clang release that support C++17
+ (Don't use trunk though as I'm still using `std::experimental::filesystem::v1`)
+
# Building
-Building _requires_ C++17. Just `mkdir build && cd build && cmake .. && make`.
+Just `mkdir build && cd build && cmake .. && make`.
+
+# Installing
+`sudo make install`. If you are using `OpenRC`, an init script is also installed.
+Sorry to `systemd` users but my only computer running `systemd` does not have
+iio sensors.
# Documentation
-None. The code documentes itself.
+None. The code documents itself.
## fifo usage
- `u [x=5,0<x<=100]`
@@ -33,10 +44,27 @@ Makes lcd x% brighter.
- `d [x=5,0<x<=100]`
Makes lcd x% darker.
- `s <x,-100<=x<=100>`
-Set relative brightness of lcd.
+Sets relative brightness of lcd.
- `r`
-Reset relative brightness of lcd, equivalent to `s 0`.
+Resets relative brightness of lcd, equivalent to `s 0`.
+- `f`
+Forces an adjustment to be made. You may want to call this when the lid
+is being opened.
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!
+
+# Tested on
+ - Lenovo ThinkPad X1 Yoga 1st gen.
+
+# To-do
+ - Less segmentation faults
+ - Less data races
+ - Input sanitation
+ - Actual, _real_ logging: not printf'ing to `stdout`.
+ - More fifo commands: disabling auto adjustment, set absolute brightness etc.
+ - use iio triggers instead?
+ - auto orientation using accelerometer?
+ - hogging cpu and battery?
+ - ability to order pizza?