A tool to adjust gamma and color tint for Wayland compositors.
Run the following commands to build the project:
mkdir -p build
cd build
cmake ..
make wlr-gamma-control-header wlr-gamma-control-source
cmake .. # This second invocation is required to detect the additional source files generated by the preceding step
makeAfter building compiled binary can be found in the bin directory.
After running the commands above run the following command in the build directory to install to your system globally:
sudo make installTo darken the red channel while leaving everything else untouched:
wlgamma -r 0.9To set the gamma for all channels:
wlgamma -G 1.1To apply a complex effect:
wlgamma -r 0.5 -g 1.5 -b 0 -G 1.6To undo the effect simply kill the program.
If the program fails to find your Wayland compositor please make sure one is running and that the WAYLAND_DISPLAY environment variable is configured correctly in the environment in which the program is running.
If the program fails to find zwlr_gamma_control_manager_v1 this is probably because your Wayland compositor does not support the required extension. The required extension is wlr-gamma-control-unstable-v1. Check the documentation of your Wayland compositor for more information.
Internally the program works by passing per-channel gamma ramps to the Wayland compositor. These ramps are generated according to the following equation:
y = (x * multiplier)^(1 / gamma)
Where gamma is the user-supplied gamma value, multiplier is the user supplied channel-specific multiplier and x is a value between 0 and 1 inclusive indicating the position on the ramp.
Developed by Amini Allight, licensed under the GPL 3.0 except for wl/wlr-gamma-control-unstable-v1.xml, taken from here, which is included under the terms of the license found within the file itself.
Many thanks to Kenny Levinsen for developing wlsunset, a similar program which was a great help in learning how to use the wlr-gamma-control extension correctly.