-
Notifications
You must be signed in to change notification settings - Fork 10
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 |
|
✔ |
/org/clightd/clightd/Backlight
Note that this is the old version of the Backlight API, that now just acts as a router for the new Backlight2 API.
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 device it finds (through libudev and ddcutil)!
For external monitors, you should use 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
Sig | OUT | OUT values |
---|---|---|
Changed | sd |
|
/org/clightd/clightd/Backlight2
New version for Backlight interface; it has a main object path that acts as router to any screen (both internal and external) it found; moreover each screen has its own object path.
Backlight2 Smooth struct:
- d -> smooth step (eg: 0.02, 0 to disable smoothing)
- u -> smooth timeout: timeout for smoothing in ms (0 to disable smoothing)
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Get | a(sd) |
|
✔ | ✔ | ✔ | |||
Set | d(du) |
|
✔ | ✔ | ✔ | ✔ | ||
Raise | d(du) |
|
✔ | ✔ | ✔ | ✔ | ||
Lower | d(du) |
|
✔ | ✔ | ✔ | ✔ |
Sig | OUT | OUT values |
---|---|---|
Changed | sd |
|
Each screen API implements same interface described above, plus it exposes 2 properties:
Prop | OUT | OUT values | Writable | Const |
---|---|---|---|---|
Max | i |
|
✔ | |
Internal | b |
|
✔ |
/org/clightd/clightd/Gamma
Gamma Smooth struct:
- b -> isSmooth (true for smooth change)
- u -> smooth step (eg: 50)
- u -> smooth timeout: timeout for smoothing in ms
Note that both ID and AUTH here below have different meaning for different plugins. Be sure to check out also https://github.com/FedeDP/Clightd/wiki/Gamma.
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Get | ss |
|
i |
|
✔ | ✔ | ✔ | |
Set | ssi(buu) |
|
b |
|
✔ | ✔ | ✔ | ✔ |
Sig | OUT | OUT values |
---|---|---|
Changed | si |
|
/org/clightd/clightd/Sensor
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Capture | sis |
|
sad |
|
✔ | ✔ | ✔ | ✔ |
IsAvailable | s |
|
sb |
|
✔ | ✔ | ✔ |
To know more about Sensor API and available settings strings, head to Sensors wiki page.
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 |
|
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.
/org/clightd/clightd/Dpms
Note that both ID and AUTH here below have different meaning for different plugins. Be sure to check out also https://github.com/FedeDP/Clightd/wiki/Dpms.
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Get | ss |
|
i |
|
✔ | ✔ | ✔ | |
Set | ssi |
|
b |
|
✔ | ✔ | ✔ | ✔ |
Sig | OUT | OUT values |
---|---|---|
Changed | si |
|
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.
Only GetClient requires polkit auth because other calls are already restricted to dbus sender.
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 |
|
/org/clightd/clightd/Screen
Screen module offers an easy way to compute currently screen-emitted brightness.
Note that both ID and AUTH here below have different meaning for different plugins. Be sure to check out also https://github.com/FedeDP/Clightd/wiki/Screen.
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
GetEmittedBrightness | ss |
|
d |
|
✔ | ✔ | ✔ |
KbdBacklight module offers an easy way to set keyboards backlight and stop timeout on all available keyboards.
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Get | a(sd) |
|
✔ | ✔ | ✔ | |||
Set | d |
|
b |
|
✔ | ✔ | ✔ | ✔ |
GetTimeout | a(si) |
|
✔ | ✔ | ✔ | |||
SetTimeout | i |
|
b |
|
✔ | ✔ | ✔ | ✔ |
Sig | OUT | OUT values |
---|---|---|
Changed | sd |
|
KbdBacklight object paths offer an easy way to set and retrieve keyboard backlight and stop timeout on specific keyboard.
Method | IN | IN values | OUT | OUT values | Polkit restricted | Xorg | Wayland | tty |
---|---|---|---|---|---|---|---|---|
Set | d |
|
b |
|
✔ | ✔ | ✔ | ✔ |
Get | d |
|
✔ | ✔ | ✔ | |||
SetTimeout | i |
|
b |
|
✔ | ✔ | ✔ | ✔ |
GetTimeout | i |
|
✔ | ✔ | ✔ |
Sig | OUT | OUT values |
---|---|---|
Changed | d |
|