Simple utility that inverts colors on all screens, using XrandR.
- XrandR development files (
apt-get install libxcb-randr0-dev
) - Type
sudo make deps-apt
on Debian / Ubuntu
- From a terminal, type
make
Execute sudo make install
after build to put the binary in the following location:
/usr/local/bin/xrandr-invert-colors
Run xrandr-invert-colors.bin
for inverting colors on all screens.
The follwing program option is implemented:
-s <crtc_number>
: Instead of inverting all screens, invert only the colors of the screen identified by<crtc_number>
.--help
and-h
: Print a short help for the program.--version
: Print a (dummy) version information.-d
: Enables debug log on standard output. Prints diagonstic messages.
Hint: put the executable in the a directory listed in $PATH, and bind the execution of xrandr-invert-colors.bin
to a shortcut key.
Redshift developers, for creating the XRandR gamma setting code. Their code is reused in this application. http://jonls.dk/redshift/ https://launchpad.net/redshift
xcalib -i -a
: Inverts the colors of the current screen.- Note that as of date of last testing (2014, xcalib version 0.8) xcalib has not been able to invert the colors on all monitors in a multi-monitor setup, because all monitors are presented by the X11 server as a single screen. Thus this limitation is coming from the X11 server.
xrandr-invert-colors
does not have this limitation, because it uses XRandR API, which correctly handles all attached monitors.
- Note that as of date of last testing (2014, xcalib version 0.8) xcalib has not been able to invert the colors on all monitors in a multi-monitor setup, because all monitors are presented by the X11 server as a single screen. Thus this limitation is coming from the X11 server.
GNU GPL v3
Please make sure that other color-adjusting program is not running in the background, like RedShift.
xrandr-invert-colors only works on Xorg, not on Wayland (or Mir). Please make sure that you use Xorg.
"On supported systems, Wayland is now the default display server. The older display server is still available: just choose Ubuntu on Xorg from the cog on the log in screen. " https://wiki.ubuntu.com/ArtfulAardvark/ReleaseNotes
See issue #15 .