per-window filters
please implement per-window filters (pixel shaders?) for at least brightness/contrast/inversion (to provide basic utility for taming the output of uncooperative software)
the man page says this already exists for inversion but I guess it can be improved
--invert-color-include CONDITION Specify a list of conditions of windows that should be painted with inverted color. Resource-hogging, and is not well tested.
Sorry for the very late reply firstly.
I doubt if it's a good idea to include the feature into compton right now:
- I believe it's the responsibility of the application developer if an application does not cooperate with your eyes, regarding the brightness and contrast -- for example, 3D games often provide controls of these factors. Color inversion is a different thing.
- We already have too many messy, disorganized, and dirty options. I think it's better to redesign the configuration system before adding another condition-matching option.
- Only a few people need the feature, I suppose.
Here's a patch that provides custom fragment shader support to compton, together with a GLSL shader that adjusts contrast, brightness, and saturation: https://gist.github.com/richardgv/af42ea1fc377f447a38e
You could modify the shader, then run with something like --glx-prog-win-rule compton-chg-saturate-brightness-contrast.glsl:'class_g="Firefox"' to achieve the desired effect.
The code is very messy because it's much larger than my expectation and I don't have the time to clean it up...
Sorry for the very late reply firstly.
thanks in any case :}
- I believe it's the responsibility of the application developer ...
of course I agree but I also see enough useful applications written by respectively irresponsible developers that I think it does belong in a window manager (even if I wish it didn't)
- We already have too many ... better to redesign the configuration system before ...
fair enough please keep the idea in mind
- Only a few people need the feature, I suppose.
I suppose so too and I hope encourage them that we need not swallow the status quo
Here's a patch ...
thank you :}
I believe it's the responsibility of the application developer ...
of course I agree but I also see enough useful applications written by respectively irresponsible developers that I think it does belong in a window manager (even if I wish it didn't)
Only a few people need the feature, I suppose.
I suppose so too and I hope encourage them that we need not swallow the status quo
More often than not you have to "swallow the status quo" and find the developers irresponsible, because developers of open-source projects frequently don't have to enough time to deal with them, unfortunately.
Another use case for per-window filters is color-key transparency (https://github.com/chjj/compton/issues/183), for applications which don't natively support transparency (ARGB colors). Currently, using a pixel shader to enable color-key transparency applies the shader to all applications, even if it is needed for only one. This is somewhat wasteful from a performance perspective, and precludes using different transparency settings for different applications.
I'm very interested in this feature to apply different levels of dimming to different windows I have to make their brightness and color comparable. Any update on whether this or something else will make it into compton (or is possible in another way)?