-
Notifications
You must be signed in to change notification settings - Fork 11
Api
Clightd offers a bus interface at org.clightd.clightd that is splitted into various objects paths/interfaces.
Prop | OUT | OUT values | Writable | Const |
---|---|---|---|---|
Version | s |
|
✔ |
Backlight Smooth struct:
- b -> isSmooth (true for smooth change)
- d -> smooth step (eg: 0.02)
- u -> smooth timeout: timeout for smoothing in ms
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
GetAll | s |
|
a(sd) |
|
✔ | ✔ | ✔ | |
SetAll | d(bdu)s |
|
b |
|
✔ | ✔ | ✔ | ✔ |
RaiseAll | d(bdu)s |
|
b |
|
✔ | ✔ | ✔ | ✔ |
LowerAll | d(bdu)s |
|
b |
|
✔ | ✔ | ✔ | ✔ |
Get | s |
|
sd |
|
✔ | ✔ | ✔ | |
Set | d(bdu)s |
|
b |
|
✔ | ✔ | ✔ | ✔ |
Raise | d(bdu)s |
|
b |
|
✔ | ✔ | ✔ | ✔ |
Lower | d(bdu)s |
|
b |
|
✔ | ✔ | ✔ | ✔ |
Note that passing an empty/NULL string as internal backlight interface parameter will make clightd use first subsystem matching device it finds (through libudev) for SetAll/GetAll/RaiseAll/LowerAll methods!
Note that Set/Get/Lower/Raise methods require an existent serial to be passed as parameter. You cannot pass a NULL/empty string, not even for internal laptop backlight.
In Set/Get/Lower/Raise methods, for external monitors, you should pass device Serial Number or I2C bus, as found through:
sudo ddcutil detect
Display 1
I2C bus: /dev/i2c-1
EDID synopsis:
Mfg id: ACI
Model: ASUS VX239
Serial number: G2LMTJ006007
Manufacture year: 2016
EDID version: 1.3
VCP version: 2.1
Gamma Smooth struct:
- b -> isSmooth (true for smooth change)
- u -> smooth step (eg: 50)
- u -> smooth timeout: timeout for smoothing in ms
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Get | ss |
|
i |
|
✔ | |||
Set | ssi(buu) |
|
b |
|
✔ | ✔ |
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Capture | si |
|
sad |
|
✔ | ✔ | ✔ | ✔ |
IsAvailable | s |
|
sb |
|
✔ | ✔ | ✔ |
Note that passing an empty/NULL string as device sysname will make clightd use first sensor device it finds (through libudev).
Sig | OUT | OUT values |
---|---|---|
Changed | ss |
|
Supported sensors, by priority:
- ALS devices
- Camera devices
For each supported device type, a new object path that implements same interface as /org/clightd/clightd/Sensor will be created to forcefully use that device's type. So these objects' paths are available too:
- /org/clightd/clightd/Sensor/Als
- /org/clightd/clightd/Sensor/Camera
When a new sensor becomes available, a "Changed" signal is sent on both /org/clightd/clightd/Sensor and /org/clightd/clightd/Sensor/$SensorType object paths.
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Get | ss |
|
i |
|
✔ | ✔ | ||
Set | ssi |
|
i |
|
✔ | ✔ | ✔ |
Note: TTY is detected whenever an empty/NULL string is passed as env DISPLAY.
Idle interface is "client" based: you request a new Idle client, set required Client's properties, and then start it.
When you are finished, you can stop it and destroy it.
Note that caller is validated against desired client, ie: if you created Client0, you can only call methods and set properties on Client0. If you try on Client1, you will receive EPERM error.
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
GetClient | o |
|
✔ | ✔ | ✔ | |||
DestroyClient | o |
|
✔ | ✔ | ✔ |
Prop | OUT | OUT values | Writable | Const |
---|---|---|---|---|
Timeout | u |
|
✔ |
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Start | ✔ | ✔ | ✔ | |||||
Stop | ✔ | ✔ | ✔ |
Sig | OUT | OUT values |
---|---|---|
Idle | b |
|
Screen module offers an easy way to compute currently screen-emitted brightness.
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
GetEmittedBrightness | ss |
|
d |
|
✔ |