Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve behavior of invert-color-include #467

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

tobia
Copy link

@tobia tobia commented Dec 11, 2017

This commit renders windows in the invert-color-include list with their frames non-inverted, that is, the color inversion is only applied to the client area. This makes sense because the frame is usually defined by the window manager and does not need color inversion.

Additionally the color hue is restored, so that only luminance is inverted. This is consistent with the behavior of other color inversion utilities (such as the Deluminate plugin for Chrome and Owl for Firefox) and has the effect of leaving red elements red, green ones green, and so on, while inverting the background and foreground luminance.

tobia and others added 4 commits December 11, 2017 17:12
Windows in the invert-color-include list now get their frames painted with
non-inverted colors, ie. the color inversion only applies to the client area.

Additionally the hue is restored, so that only luminance is inverted.
@tobia
Copy link
Author

tobia commented Dec 21, 2019

I have added more features to my branch and to this pull request:

  1. Fixed glx-fshader-win option (custom GLSL shader) so that it can be specified in the configuration file (it was commandline-only)
  2. Added a glx-fshader-win-file option that loads the shader from an external file.
  3. Added a new uniform margin to GLSL shaders, containing the frame extents, so that a shader can invert the color of the client area, while leaving the frame intact.

I have also updated the sample GLSL shader. It employs a fast, custom luminance inversion formula that I developed, that keeps the color saturation and hue, and excludes the window frame decoration from the inversion. This GLX / GLSL version incurs no visible delay, as opposed to the XRender-based color inversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant