Skip to content

Latest commit

 

History

History
62 lines (53 loc) · 2.37 KB

README.md

File metadata and controls

62 lines (53 loc) · 2.37 KB

ICC Color Brightness

use ICC color profiles to change the brightness of the display inspired by icc-brightness but more performant and does not produces ICC files in local directory

NOTE: currently only intel_backlight is used for backlight change

Installation

mkdir build && cd build
cmake ..
make install

Archlinux

Dependencies

colord
lcms2
easyloggingpp
# only for building
pkgconf
cmake

How it works

  • uses inotify to watch for changes on the kernel backlight driver (currently only /sys/class/backlight/intel_backlight/brightness)
  • if this file gets modified, it sends events and the changed content to the main programm
  • the main programm then uses little-cms to create a color profile with the brightness from the file
  • this profile then gets applied to the colord-daemon but the daemon needs a file to read from
  • this file is a file only in memory, and only exist as long as the programm runs (it uses the syscall memfd_create)

Where it works

  • should work on all linux-based systems using the colord-daemon for color management and a compositor (wayland or Xorg) which supports color-manaement (e.g. Gnome, KDE, etc)

Currently testet on

  • Archlinux with Gnome

Compositor not working with

Development

Todo

  • add commandline interface
  • add config file?
  • improve structure
  • improve readme

workarround for icc file

  • for a icc profile (which is needed for a setting it system wide) a file need to be saved some ware -> read/write in the slow SSD
  • as a work arround, 3 solutions:
    1. save the file in a tmpfs
    2. use a named pipe as a file, eg.:
    mkfifo my_pipe
    cat file > my_pipe
    echo my_pipe > new_file
    rm my_pipe
    1. (current approach) use a memfd (memfd_create) to simulate a file in a fd which is saved in ram an cleared, if reference is cleared

Filewatcher approach

  • use inotify and conditional variables as notification system for file changes