|
@@ -27,8 +27,8 @@ Introduction
|
27
|
27
|
* Possibility to set a minimum brightness value
|
28
|
28
|
|
29
|
29
|
Let's get started with a few examples, for details, see below for the
|
30
|
|
-full description of the different operating modes, value conversion and
|
31
|
|
-how to operate different controllers.
|
|
30
|
+full description of the different commands, options and how to access
|
|
31
|
+different controllers.
|
32
|
32
|
|
33
|
33
|
|
34
|
34
|
Examples
|
|
@@ -77,85 +77,61 @@ Verify by reading back the max brightness, you should get a value of 1:
|
77
|
77
|
Usage
|
78
|
78
|
-----
|
79
|
79
|
|
80
|
|
-Light has 5 different criteria on flags to use: operation modes, value
|
81
|
|
-mode, target, field and controller mode. Flags from these different
|
82
|
|
-modes can never be used in conjunction, i.e. you cannot get and set a
|
83
|
|
-value at the same time, that requires different invocations.
|
|
80
|
+### Commands
|
84
|
81
|
|
85
|
|
-**Note:** like most UNIX applications, light only print errors if you
|
86
|
|
- are using it incorrectly. If something goes wrong, and you can't
|
87
|
|
- figure out why, try setting the verbosity flag with -v:
|
|
82
|
+* `-G`: Get (read) brightness/data from controllers/files
|
|
83
|
+* `-S VAL`: Set (write)brightness/data to controllers/files
|
|
84
|
+* `-A VAL`: Like `-S`, but adds the given value
|
|
85
|
+* `-U VAL`: Like `-S`, but subtracts the given value
|
|
86
|
+* `-O`: Save the current brightness for later use (usually used on shutdown)
|
|
87
|
+* `-I`: Restore the previously saved brightness (usually used on boot)
|
|
88
|
+* `-L`: List available controllers, see below `-k` option as well
|
|
89
|
+
|
|
90
|
+Without any options (below) the commands operate on the brightness of an
|
|
91
|
+automatically selected controller. Values are given in percent, unless
|
|
92
|
+the below `r` option is also given.
|
|
93
|
+
|
|
94
|
+**Note:** like most UNIX applications, light only gives output on
|
|
95
|
+ errors. If something goes wrong try the verbosity option `-v VAL`:
|
88
|
96
|
|
89
|
97
|
* 0: No debug output
|
90
|
98
|
* 1: Errors
|
91
|
99
|
* 2: Errors, warnings
|
92
|
100
|
* 3: Errors, warnings, notices
|
93
|
101
|
|
|
102
|
+### Options
|
94
|
103
|
|
95
|
|
-### Operation modes
|
96
|
|
-
|
97
|
|
-The operation modes describe **what** you want to do.
|
98
|
|
-
|
99
|
|
-* -G: Which **reads/gets** brightness/data from controllers/files
|
100
|
|
-* -S: Which **writes/sets** brightness/data to controllers/files
|
101
|
|
-* -A: Which does like -S but instead **adds** the value
|
102
|
|
-* -U: Which does like -S but instead '**subtracts** the value
|
103
|
|
-* -O: Save the current brightness for later use (usually used on shutdown)
|
104
|
|
-* -I: Restore the previously saved brightness (usually used on boot)
|
105
|
|
-* -L: List the available controllers
|
106
|
|
-
|
107
|
|
-When used by themselves operate on the brightness of a controller that
|
108
|
|
-is selected automatically. S, A and U needs another argument -- except
|
109
|
|
-for the main 4 criteria -- which is the value to set/add/subtract. This
|
110
|
|
-can be specified either in percent or in raw values, but remember to
|
111
|
|
-specify the value mode (read below) if you want to write raw values.
|
112
|
|
-
|
113
|
|
-
|
114
|
|
-### Value modes
|
115
|
|
-
|
116
|
|
-The value mode specify in what unit you want to read or write values
|
117
|
|
-in. The default one (if not specified) is in percent, the other one is
|
118
|
|
-raw mode and should always be used when you need very precise values (or
|
119
|
|
-only have a controller with a very small amount of brightness levels).
|
120
|
|
-
|
121
|
|
-* -p: Percent
|
122
|
|
-* -r: Raw mode
|
123
|
|
-
|
124
|
|
-Remember, this is the unit that will be used when you set, get, add or
|
125
|
|
-subtract brightness values.
|
126
|
|
-
|
127
|
|
-
|
128
|
|
-### Target
|
129
|
|
-
|
130
|
|
-You can choose which target to act on:
|
131
|
|
-
|
132
|
|
-* -l: Act on screen backlight
|
133
|
|
-* -k: Act on keyboard backlight and LEDs
|
134
|
|
-
|
|
104
|
+Values may be given, or presented, in percent or raw mode. Raw mode is
|
|
105
|
+the format specific to the controller. The default is in percent, but
|
|
106
|
+raw mode may be required for precise control, or when the steps are very
|
|
107
|
+few, e.g. for most keyboard backlight controllers.
|
135
|
108
|
|
136
|
|
-### Field
|
|
109
|
+* `-p`: Percent, default
|
|
110
|
+* `-r`: Raw mode
|
137
|
111
|
|
138
|
|
-As you can not only handle the **brightness** of controllers, you may
|
139
|
|
-also specify a field to read/write from/to:
|
|
112
|
+By default the screen is the active target for all commands, use `-k` to
|
|
113
|
+select the keyboard instead. In either case you may need to select a
|
|
114
|
+different controller, see below.
|
140
|
115
|
|
141
|
|
-* -b: Current brightness of selected controller
|
142
|
|
-* -m: Maximum brightness of selected controller
|
143
|
|
-* -c: Minimum brightness (cap) of selected controller
|
|
116
|
+* `-l`: Act on screen backlight, default
|
|
117
|
+* `-k`: Act on keyboard backlight and LEDs
|
144
|
118
|
|
145
|
|
-The minimum brightness is a feature implemented as some controllers make
|
146
|
|
-the screen go pitch black at 0%, if you have a controller like that, it
|
147
|
|
-is recommended to set this value (in percent or raw mode). These values
|
148
|
|
-are saved in raw mode though, so if you specify it in percent it might
|
149
|
|
-not be too accurate depending on your controller.
|
|
119
|
+By default commands act on the brightness property, which is read+write.
|
|
120
|
+The maximum brightness is a read-only property. The minimum brightness
|
|
121
|
+cap is a feature implemented to protect against setting brightness too
|
|
122
|
+low, since some controllers make the screen go pitch black at 0%. For
|
|
123
|
+controllers like that it is recommended to set this value.
|
150
|
124
|
|
|
125
|
+* `-b`: Current brightness of selected controller, default
|
|
126
|
+* `-m`: Max. brightness of selected controller
|
|
127
|
+* `-c`: Min. brightness (cap) of selected controller (recommend raw mode)
|
151
|
128
|
|
152
|
|
-### Controller modes
|
|
129
|
+Controller is automatically done to select the controller with maximum
|
|
130
|
+precision. It can however also be done manually and we recommend the
|
|
131
|
+`-L` and `-Lk` commands to list available controllers:
|
153
|
132
|
|
154
|
|
-Finally, you can either use the built-in controller selection to get the
|
155
|
|
-controller with the maximum precision, or you can specify one manually
|
156
|
|
-with the -s flag. The -a flag will force automatic mode and is
|
157
|
|
-default. Use -L to get a list of controllers to use with the -s flag (to
|
158
|
|
-specify which controller to use).
|
|
133
|
+* `-a`: Automatic controller selection
|
|
134
|
+* `-s ARG`: Manual controller selection
|
159
|
135
|
|
160
|
136
|
**Note:** Without the `-s` flag on _every_ command light will default
|
161
|
137
|
to automatic controller selection.
|