aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.com>2019-06-29 03:49:52 +0300
committerEvgeny Zinoviev <me@ch1p.com>2019-06-29 03:49:52 +0300
commit7928852aa377bd6c5a553e93e7bfa4403291b50b (patch)
tree5831d7045ba90b5818d8992797794709a5fab731
parentb5a8d2b885224ceb765dfdab0297b8e8793b7f68 (diff)
write readme
-rw-r--r--README.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5b6c7d5..66681ff 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,41 @@
# write-intel-brightness
+
+This is a script to control screen brightness on Lenovo ThinkPad X220 and similar after you changed PWM frequency by writing a custom value to 0xC8254 register. I use it with acpid.
+
+The script reads current PWM frequency from the register, calculates correct new brightness level for `/sys/class/backlight/intel_backlight/brighness` and writes it.
+
+### Usage
+
+To increase brightness:
+```
+write-intel-brightness +
+```
+
+To decrease:
+```
+write-intel-brightness -
+```
+
+### acpid example
+
+From `/etc/acpi/default.sh` on my Gentoo box:
+
+```
+case "$group" in
+ video)
+ case "$action" in
+ brightnessup)
+ /usr/local/bin/write-intel-brightness +
+ ;;
+
+ brightnessdown)
+ /usr/local/bin/write-intel-brightness -
+ ;;
+ esac
+ ;;
+esac
+```
+
+### License
+
+MIT