Skip to content
Federico edited this page Oct 17, 2019 · 62 revisions

Clight offers a very nice and clean Bus API; this should make quite simple to build an applet for it.

It has three main object paths:

/org/clight/clight

Bus Methods

Method IN IN values OUT OUT values
Calibrate
Inhibit b
  • Whether to inhibit dimmer module(true) or not(false)
Load s
  • Absolute path to custom module to be loaded
Unload s
  • Absolute path to custom module to be unloaded
  • Calibrate will trigger a new webcam capture
  • Inhibit will inhibit DIMMER and DPMS modules. Useful where "org.freedesktop.ScreenSaver" API is not available.
    Note that it is internally redirected to org.freedesktop.ScreenSaver.Inhibit method, thus behaviour is the same.

Read-only Bus Properties

Prop OUT OUT values Emits-Change Const
Version s Clight version
ClightdVersion s Clightd found version
Sunrise t Next sunrise time in seconds since epoch
Sunset t Next sunset time in seconds since epoch
DayTime i Current daytime:
  • 0 -> Day
  • 1 -> Night
InEvent b Whether clight is inside an event
DisplayState i Current display state:
  • 0 -> ON
  • 1 -> DIMMED
  • 2 -> OFF (DPMS)
  • 3 -> DIMMED and OFF
AcState i Current AC state:
  • 0 -> ON_AC
  • 1 -> ON_BATTERY
Inhibited b Whether clight is currently inhibited
BlPct d Current backlight percentage
KbdPct d Current keyboard backlight percentage
AmbientBr d Latest ambient brightness
Temp i Current screen temperature
Location (dd) Current user location as seen by Clight
ScreenComp d Current screen-emitted brightness compensation value

/org/clight/clight/Conf

Bus Methods

Method IN IN values OUT OUT values
Store
  • Store will dump current configuration to user conf.

Read-only Bus Properties

Prop OUT OUT values Emits-Change Const
NoBacklight b Whether BACKLIGHT tool is enabled
NoGamma b Whether GAMMA tool is enabled
NoDimmer b Whether DIMMER tool is enabled
NoDpms b Whether DPMS tool is enabled
NoScreen b Whether SCREEN tool is enabled
ScreenSamples i Bucket size for SCREEN snapshots

Bus Properties

Prop OUT OUT values Emits-Change Const
ScreenContrib d Screen-emitted brightness contribution to ambient brightness
Sunrise s User-fixed sunrise time, as read by conf file
Sunset s User-fixed sunset time, as read by conf file
Location (dd) User-fixed location, as read by conf file
NoAutoCalib b Whether inhibition will pause auto calibration
InhibitAutoCalib b Whether auto calibration is disabled
NoKbdCalib b Whether keyboard backlight calibration is disabled
AmbientGamma b Whether ambient-brightness gamma is enabled
NoSmoothBacklight b Whether backlight transitions are smooth
NoSmoothDimmerEnter b Whether dimmer entering transitions are smooth
NoSmoothDimmerExit b Whether dimmer leaving transitions are smooth
NoSmoothGamma b Whether gamma transitions are smooth
NumCaptures i Number of captures to be taken
SensorName s Sensor to be used
BacklightSyspath s Backlight syspath of internal laptop's monitor
EventDuration i Duration of an event
DimmerPct d Dimmed state backlight level in pct
Verbose b Whether verbose logging is enabled
BacklightTransStep d Backlight step of each transition, in pct
DimmerTransStepEnter d Dimmer step of each transition, in pct, while dimming
DimmerTransStepExit d Dimmer step of each transition, in pct, while undimming
GammaTransStep i Gamma step of each transition
BacklightTransDuration i Backlight duration of each step's transition
GammaTransDuration i Gamma duration of each step's transition
DimmerTransDurationEnter i Dimmer duration of each step's transition, while dimming
DimmerTransDurationExit i Dimmer duration of each step's transition, while undimming
DayTemp i Daily screen temperature
NightTemp i Night screen temperature
AcCurvePoints ad Ambient brightness to backlight level curve points on AC
BattCurvePoints ad Ambient brightness to backlight level curve points on BATT
ShutterThreshold d Shuttered capture threshold
GammaLongTransition b Whether redshift-like gamma transition is enabled
  • When a property is written, its value will immediately be used.

/org/clight/clight/Conf/Timeouts

Bus Properties

Prop OUT OUT values Emits-Change Const
AcDayCapture i Timeout between captures during the day on AC
AcNightCapture i Timeout between captures during the night on AC
AcEventCapture i Timeout between captures during an event on AC
BattDayCapture i Timeout between captures during the day on BATT
BattNightCapture i Timeout between captures during the night on BATT
BattEventCapture i Timeout between captures during an event on BATT
AcDimmer i Timeout for DIMMER tool on AC
BattDimmer i Timeout for DIMMER tool on BATT
AcDpms i Timeout for DPMS tool on AC
BattDpms i Timeout for DPMS tool on BATT
AcScreen i Timeout for SCREEN tool on AC
BattScreen i Timeout for SCREEN tool on BATT
  • When a timeout property is written, its value will immediately be used.
Clone this wiki locally