From c7f87c0d81f2af9ab3db2c2626e5e410d522d249 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 20 Jan 2013 21:03:11 +0100 Subject: how it works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- adjbacklight.texinfo | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/adjbacklight.texinfo b/adjbacklight.texinfo index b554b37..c1651ed 100644 --- a/adjbacklight.texinfo +++ b/adjbacklight.texinfo @@ -108,6 +108,27 @@ arguments. @chapter Using @cindex usage @cindex keyboard +@cindex darken screen +@cindex brighten screen +@cindex quit +@cindex exit +@cindex close +@cindex next screen +@cindex password +@cindex @command{sudo} + +These key commands work when you start @command{adjbacklight} without +arguments and can see a bar. Due to restricted write permissions in +@file{/sys} you are required to enter your password and need to be a +sudoer; if you do not want this you could make your init sequence +give you write permissions to @file{/sys/class/backlight/*/brightness}, +and just remove the @command{sudo} in the bash script @file{adjbacklight}. + +The @kbd{left} and @kbd{down} arrow keys are used to darken the screen. +The @kbd{right} and @kbd{up} arrow keys are used to brighten the screen. + +@kbd{q}, @kbd{enter} and @kbd{d} continues to the next backlight +controller, or if you are at the last one, quits the program. @node Behind the scenes @@ -115,6 +136,16 @@ arguments. @cindex behind the scenes @cindex inner workings +On normally configured Linux systems, the kernel mounts a virtual +partition on @file{/sys}. If you have screens using backlight, +you should find backlight device in @file{/sys/class/backlight}. +These devices are directories containing control files which you +can read the current values from or write to (perhaps using @command{echo}) +to modify the value. In a directory in @file{/sys/class/backlight} +you will find @file{brightness} and @file{max_brightness}. +Just read from @file{max_brightness} to get the maximum allowed integer +value in @file{brightness}, the minimum value is 0. + @node License of adjbacklight -- cgit v1.2.3-70-g09d2