MCPcopy Index your code
hub / github.com/FedeDP/Clight

github.com/FedeDP/Clight @4.11

Chat with this repo
repository ↗ · DeepWiki ↗ · release 4.11 ↗ · + Follow
403 symbols 825 edges 38 files 49 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Clight CI Build CodeQL

Packaging status

Clight is a C user daemon utility that aims to fully manage your display.
It was heavily inspired by calise in its initial intents.

For a guide on how to build, features and lots of other infos, head to Clight Wiki Pages.
Note that Wiki pages will always refer to master branch.
For any other info, please before opening an issue, head to FAQ.
If the issue is not listed there, feel free to open a new one!

Last, but not least, special thanks to all people involved in Clight!

Features

Clight allows to match your backlight level to ambient brightness, computed by capturing frames from webcam or Ambient Light Sensors.
It does also support adjusting external monitors and keyboard backlight.
Moreover, it can manage your screen temperature, just like redshift does.
Finally, it can dim your screen after a timeout and manage screen DPMS.

Note that all its features are available on both X, Wayland and tty and can be turned off from its config file.
On wayland Clight requires specific protocols to be implemented by your compositor; have a look at https://github.com/FedeDP/Clight/wiki/Modules#wayland-support.

GUI

Github user nullobsi created a (super nice!) qt gui for clight, with a useful tray applet too.
Remember to check it out: https://github.com/nullobsi/clight-gui!

Developers Corner

Clight makes use of Clightd, a system DBus service that exposes an API to manage various aspects of your screen and allows Webcam/ALS devices captures.
Its API is as generic as possible and it has nothing specifically for Clight; this means anyone can make use of it.
If you are interested, please have a look at its wiki pages too!
Indeed i even developed a super simple Clight clone as an hello world application in Go: https://github.com/FedeDP/GoLight.
It is much simpler than Clight for obvious reasons and i do not expect to develop it further.

Both Clight and Clightd make use of libmodule, a C library developed with modularity in mind that offers a simple actor framework for C, with an integrated event loop.

Morever, note that Clight exposes a DBus API itself too; it allows quickly testing config values or building scripts around it, some of which you can find in Clight FAQ: https://github.com/FedeDP/Clight/wiki/FAQ#dbus-tricks.
The DBus API first and main user is clight-gui.
Finally, it can also be expanded through Custom modules that enable users to build their own plugins to further customize Clight behaviour.

License

This software is distributed with GPL license, see COPYING file for more informations.

Core symbols most depended-on inside this repo

call
called by 32
src/modules/bus.c
is_string_empty
called by 17
src/utils/utils.c
set_timeout
called by 15
src/utils/timer.c
add_match
called by 13
src/modules/bus.c
degToRad
called by 12
src/utils/my_math.c
pause_screen
called by 11
src/modules/screen.c
get_property
called by 8
src/modules/bus.c
pause_mod
called by 8
src/modules/backlight.c

Shape

Function 361
Enum 33
Class 9

Languages

C96%
C++4%

Modules by API surface

src/modules/backlight.c39 symbols
src/modules/interface.c28 symbols
src/conf/opts.c27 symbols
src/conf/config.c24 symbols
src/modules/gamma.c22 symbols
src/modules/location.c18 symbols
src/utils/my_math.c17 symbols
src/pubsub/validations.c17 symbols
src/modules/pm.c17 symbols
src/modules/daytime.c17 symbols
src/modules/keyboard.c16 symbols
src/utils/log.c15 symbols

For agents

$ claude mcp add Clight \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact