sisyphus/config/clight.conf
Tibo De Peuter b42a2d90a0 Clight config changes
Tried to fix smooth gamma transition
Updated the config
2022-06-30 18:55:22 +02:00

360 lines
15 KiB
Text

#########################
# Clight conf file #
# ~/.config/clight.conf #
#########################
## 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 = 30;
###################
# 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 module
## 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.01;
## Transition timeout in ms
# trans_timeout = 500;
## When > 0, use a fixed transition duration (in ms),
## overriding trans_timeout and trans_step configs.
# trans_fixed = 5000;
## 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 ];
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.175;
## 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.9, 0.15, 0.23, 0.36, 0.52, 0.59, 0.65, 0.71, 0.75, 0.78, 0.80 ];
batt_regression_points = [ 0.00, 0.05, 0.10, 0.10, 0.17, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.00 ];
## 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 = [ 20, 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 ambient brightness to keyboard 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.
## 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 ambient brightness, the higer 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 ];
## Uncomment to switch off keyboard on dimming/dpms.
# dim = true;
};
##############
# 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, 2500 ];
## 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 ambient brightness, like monitor backlight.
## When enabled, screen temperature won't be changed time-based.
## Note that it uses same curve points as backlight.
## 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 = 50.5;
## Desired longitude for gamma support (sunrise/sunset in this location)
longitude = 4.00;
## 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 = [ 600, 300 ];
## 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 = [ 10, 10 ];
};
############################
# SCREEN COMPENSATION TOOL #
############################
###########################################
# Requires BACKLIGHT. Disabled otherwise. #
###########################################
screen:
{
##############################################################################################################
## Use this feature to provide screen-emitted brightness compensation to Clight. #
## The idea here is: #
## dark ambient -> higher monitor light contribution impact #
## bright ambient -> lower monitor light contribution impact #
## But, at the same time, obviously (as that is clight main feature): #
## dark ambient -> lower monitor backlight level -> lower monitor light contribution impact #
## high ambient -> high monitor backlight level -> higher monitor light contribution impact #
## We can assume these 2 contributions to zero each other, letting us just compute screen-emitted brightness #
## and linearly multiplying it for our guessed ambient-brightness screen contribution value. #
##############################################################################################################
## Uncomment to disable screen-emitted brightness compensation support
disabled = true;
## Screen timeouts on AC/on BATT.
## Set any of these to <= 0 to disable screen-emitted brightness 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 = [ 30, -1 ];
## How much does your screen-emitted brightness affect
## ambient brightness, in your setup, in percentage.
# contrib = 0.1;
## How many samples should be used to compute average
## screen-emitted brightness.
# num_samples = 10;
};