-
Notifications
You must be signed in to change notification settings - Fork 0
/
clight.conf
366 lines (312 loc) · 15.4 KB
/
clight.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
####################
# Clight conf file #
####################
## Verbose mode, useful to report bugs:
## run clight in verbose mode,
## then open issue on github attaching log
# verbose = true;
## Delay in seconds before clight restarts working
## after system is resumed from suspend/hibernation.
## This may be needed because on some laptops on resume
## screen temp is not correctly applied, with warning in logs: "Failed to set gamma temperature."
## Clight is in fact too quick to act on resume, and it is resuming before X is fully resumed;
## thus failing to apply screen temperature.
## By default, it is disabled (0 seconds). Max value: 30seconds.
## Note: it requires systemd-logind (org.freedesktop.login1 dbus interface)
# resumedelay = 0;
###################
# INHIBITION TOOL #
########################################################
# Requires DIMMER or DPMS enabled. Disabled otherwise. #
########################################################
inhibit:
{
## Uncomment to disable
# disabled = true;
## Uncomment to let Clight manage "Docked" laptop state
## as an inhibition (pausing DPMS and dimmer).
## Note that "Docked" state is only checked when
## laptop lid is closed or opened.
# inhibit_docked = true;
## Uncomment to let Clight manage inhibition requests
## suppressing org.freedesktop.PowerManagement too
## (ie: preventing your laptop to suspend/hibernate)
# inhibit_pm = true;
## Uncomment to let Clight pause backlight and screen modules
## while any inhibition is active;
## this is useful eg: to pause backlight calibration
## while watching a movie.
# inhibit_bl = true;
};
##############################
# BACKLIGHT CALIBRATION TOOL #
##############################
backlight:
{
## Uncomment to disable
# disabled = true;
## Uncomment to restore screen backlight on exit
# restore_on_exit = true;
## Uncomment to disable smooth transitions
# no_smooth_transition = true;
## Transition step in percentage
# trans_step = 0.05;
## Transition timeout in ms
# trans_timeout = 30;
## When > 0, use a fixed transition duration (in ms),
## overriding trans_timeout and trans_step configs.
# trans_fixed = 1000;
## Timeouts between captures during day/night/event on AC
## Set any of these to <= 0 to disable captures
## in the corresponding day time.
# ac_timeouts = [ 600, 2700, 300 ];
## Timeouts between captures during day/night/event on BATT
## Set any of these to <= 0 to disable captures
## in the corresponding day time.
# batt_timeouts = [ 1200, 5400, 600 ];
## Set a threshold: if detected ambient brightness is below this threshold,
## capture will be discarded and no backlight change will be made.
## Very useful to discard captures with covered webcam.
# shutter_threshold = 0.10;
## Disables automatic calibration for screen backlight.
## Then, it can only be manually triggered by bus api.
# no_auto_calibration = true;
## Uncomment to let BACKLIGHT module pause automatic calibration when laptop lid is closed.
## Mostly useful when laptop gets docked and thus internal webcam
## would not be able to correctly capture ambient brightness.
# pause_on_lid_closed = true;
## Uncomment to let BACKLIGHT module fire an automatic calibration when laptop lid gets opened.
# capture_on_lid_opened = true;
};
###################
# SENSOR settings #
###################
sensor:
{
## Curves used to match ambient brightness to backlight level for each AC state.
## X axis: ambient brightness values (from 0 to 10)
## Y axis: desired backlight level for corresponding ambient brightness.
## Note: the array can be expanded up to 50 points for finer granularity.
# ac_regression_points = [ 0.0, 0.15, 0.29, 0.45, 0.61, 0.74, 0.81, 0.88, 0.93, 0.97, 1.0 ];
# batt_regression_points = [ 0.0, 0.15, 0.23, 0.36, 0.52, 0.59, 0.65, 0.71, 0.75, 0.78, 0.80 ];
## Sensor device to be used (Webcam or ALS device, eg: video0 or iio:device0).
## Leave this empty to let clight use first device it finds between supported ones,
## ie: webcams, ambient light sensors, or custom devices.
## Refer to Clightd wiki for more info: https://github.com/FedeDP/Clightd/wiki/Sensors
# devname = "";
## Sensor settings to be used. Leave empty/commented to use default values.
## This can be really useful to further customize your sensor behaviour (together with backlight_regression_points).
## Have a look at Clightd wiki for more info: https://github.com/FedeDP/Clightd/wiki/Sensors#settings-string.
## Example for Camera sensor, to set a manual exposure -> "10094849=1,10094850=166";
# settings = "";
## Number of frames or ALS device pollings to be captured on AC/on BATT.
## Must be between 1 and 20.
# captures = [ 5, 5 ];
};
## Curves used to match reference backlight level (computed through sensor.regression_points curves),
## to backlight level for each AC state for specific monitors.
## This allows per-monitor backlight adjustment; it means eg:
## that a 0.7 backlight level for your internal laptop monitor,
## can be mapped to 0.8 backlight level for your external monitor.
## It is mostly useful for people with internal laptop + external monitors or multiple external monitors,
## as often their backlight level will not properly match (ie: a 50% level on internal laptop can be much brighter than external monitor).
## All monitors not specified below will use default reference values (specified by sensor.regression_points curves).
## X axis: default backlight level (from 0 to 10)
## Y axis: desired backlight level adjusted for specific monitor.
## Note: arrays can be expanded up to 50 points for finer granularity.
## Customize "intel_backlight" or "acpi_video0" or whatever using your monitors IDs.
## To find monitor IDs, use Clightd:
## busctl call org.clightd.clightd /org/clightd/clightd/Backlight org.clightd.clightd.Backlight GetAll "s" ""
##
## You might ask why using a backlight-to-backlight mapping for specific monitors, instead of using
## multiple ambient_brightness-to-backlight mapping curves; fact is that this way Clight is also able to
## set correct backlight for each monitor even when just asked to set the backlight, ie:
## when the request comes from eg: dbus API asking for a certain backlight level (IncBl, DecBl dbus methods).
## In this case, we wouldn't have an "ambient brightess" to be used to compute correct backlight level on each monitor;
## instead, we just set the requested backlight as default, and adjust to it for each monitor specified here below.
monitor_override:
(
{
# monitor_id = "intel_backlight"
# ac_regression_points = [ 0.0, 0.18, 0.22, 0.33, 0.55, 0.64, 0.71, 0.80, 0.90, 0.97, 1.0 ];
# batt_regression_points = [ 0.0, 0.15, 0.29, 0.45, 0.61, 0.74, 0.81, 0.88, 0.93, 0.97, 1.0 ];
},
{
# monitor_id = "acpi_video0"
# ac_regression_points = [ 0.0, 0.18, 0.22, 0.33, 0.55, 0.64, 0.71, 0.80, 0.90, 0.97, 1.0 ];
# batt_regression_points = [ 0.0, 0.15, 0.29, 0.45, 0.61, 0.74, 0.81, 0.88, 0.93, 0.97, 1.0 ];
}
);
##############################
# KEYBOARD BACKLIGHT TOOL #
##############################
keyboard:
{
## Uncomment to disable keyboard automatic calibration.
## It is automatically disabled anyway where not available.
# disabled = true;
## Timeouts on AC/on BATT for keyboard auto dimming.
## Set any of these to <= 0 to disable kbd backlight
## in the corresponding AC state.
# timeouts = [ 15, 5 ];
## Curves used to match screen backlight to keyboard backlight level for each AC state.
## X axis: default screen backlight level (from 0 to 10)
## Y axis: desired keyboard backlight level for corresponding screen backlight.
## Note: the array can be expanded up to 50 points for finer granularity.
## Note also that most keyboard offers only 3 backlight levels (off, mid, high).
## Default curves are same as default backlight curves but upside down
## (ie: the lower the screen backlight, the higher the keyboard backlight).
# ac_regression_points = [ 1.0, 0.97, 0.93, 0.88, 0.81, 0.74, 0.61, 0.45, 0.29, 0.15, 0.0 ];
# batt_regression_points = [ 0.80, 0.78, 0.75, 0.71, 0.65, 0.59, 0.52, 0.36, 0.23, 0.15, 0.0 ];
};
##############
# GAMMA TOOL #
##############
gamma:
{
## Uncomment to disable gamma tool
# disabled = true;
## Uncomment to restore screen temperature on exit
# restore_on_exit = true;
## Uncomment to disable gamma smooth transitions
# no_smooth_transition = true;
## Gamma transition step
# trans_step = 50;
## Gamma transition timeout in ms
# trans_timeout = 300;
## Gamma temperature during day and night
# temp = [ 6500, 4000 ];
## Enable to let GAMMA smooth transitions last (2 * event_duration),
## in a redshift-like way.
## When enabling this, transition steps and timeouts are automatically computed
## given DAY-NIGHT temperature difference and (2 * event_duration) duration.
##
## Note that if clight is started outside of an event, correct gamma temperature
## will be immediately setted using normal parameters:
## no_smooth_gamma_transition, gamma_trans_step, gamma_trans_timeout
# long_transition = true;
## Let screen temperature match monitor backlight, using following algorithm:
## ```pseudocode
## diff = abs(temp[DAY] - temp[NIGHT])
## min_temp = min(temp[NIGHT], temp[DAY])
## new_temp = (diff * screen_bl) + min_temp;
## ```
## Ie: the higher the screen backlight, the colder the temp.
##
## When enabled, screen temperature won't be changed time-based.
## Note also that LOCATION is still needed to let BACKLIGHT module know current time of day.
## Finally, it requires BACKLIGHT module to be enabled, otherwise it gets disabled.
# ambient_gamma = true;
};
################
# DAYTIME TOOL #
################
########################################################
# Retrieves Sunrise and Sunset times for user location #
########################################################
daytime:
{
## Desired latitude for gamma support (sunrise/sunset in this location)
# latitude = 40.9;
## Desired longitude for gamma support (sunrise/sunset in this location)
# longitude = 7.16;
## Force set a sunrise time
# sunrise = "7:00";
## Force set a sunset time
# sunset = "19:00";
## Duration of an "event". Clight will enter "event" mode (more frequent screen recalibrations)
## from event_duration seconds before a sunrise/sunset, until event_duration seconds after.
# event_duration = 1800;
## Set an offset in seconds from sunrise;
## eg: a value of 600 would force Clight to manage sunrise event
## 10 minutes after the real event.
## You can use negative values too.
# sunrise_offset = 0;
## Set an offset in seconds from sunset;
## eg: a value of 600 would force Clight to manage sunset event
## 10 minutes after the real event.
## You can use negative values too.
# sunset_offset = 0;
};
###############
# DIMMER TOOL #
###############
###########################################
# Requires BACKLIGHT. Disabled otherwise. #
###########################################
dimmer:
{
## Uncomment to disable dimmer tool
disabled = true;
## Uncomment to disable smooth transitions
## when entering/leaving dimmed state
# no_smooth_transition [ true, true ];
## Transition step in percentage.
## Entering dimmed state fade, and leaving fade
# trans_steps = [ 0.05, 0.05 ];
## Transition timeout in ms.
## Entering dimmed state fade, and leaving fade
# trans_timeouts = [ 30, 30 ];
## When > 0, use a fixed transition duration (in ms),
## for enter or leave, overriding trans_timeouts and trans_steps configs.
# trans_fixed = [ 1000, 1000 ];
## Timeouts on AC/on BATT.
## Set any of these to <= 0 to disable dimmer
## in the corresponding AC state.
# timeouts = [ 45, 20 ];
## Change dimmed backlight level, in percentage
# dimmed_pct = 0.2;
};
#############
# DPMS TOOL #
#############
dpms:
{
## Uncomment to disable dpms management
# disabled = true;
## Timeouts on AC/on BATT.
## Set any of these to <= 0 to disable dpms
## in the corresponding AC state.
# timeouts = [ 900, 300 ];
};
############################
# SCREEN COMPENSATION TOOL #
############################
###########################################
# Requires BACKLIGHT. Disabled otherwise. #
###########################################
screen:
{
##############################################################################################################
## Use this feature to enable screen-content based backlight adjustments to Clight. #
## This means that monitord backlight won't be changed to match ambient brightness alone, #
## but screen content brightness too, using following algorithm: #
## ```pseudocode #
## window_min = ambient_br - contrib; #
## window_max = ambient_br + contrib; #
## bl_new = window_max - (0.4 * screen_br) #
## ``` #
## Ie: ambient brightness is used as a sliding window 20% wide, #
## and screen content brightness is used to choose the correct point inside the window. #
## Rule is: higher the screen content brightness, nearest to window max; and viceversa. #
## Idea is fairly simple: given current ambient brightness, try to light up dark screen content, and dim #
## bright screen content. #
## #
## This can impact battery life, that is the reason why SCREEN module is disabled on battery by default; #
## in this case, you might want to keep SCREEN module disabled and manually calibrating screen backlight #
## through Clight desktop file "Capture" quick action or its DBus command. #
##############################################################################################################
## Uncomment to disable screen-emitted brightness compensation support
# disabled = true;
## How much does your screen brightness affect
## ambient brightness, in percentage.
## As above algorithm outlines, it is used to build the ambient brightness window.
## Set it to 0.0 to disable screen-content based backlight compensation.
# contrib = 0.2;
## Screen timeouts on AC/on BATT.
## Set any of these to <= 0 to disable screen-content based backlight compensation
## in the corresponding AC state.
## Disabled by default on BATT because it is quite an heavy operation,
## as it has to take a snapshot of your X desktop and compute its brightness.
# timeouts = [ 5, -1 ];
};