yshui / picom

A lightweight compositor for X11 with animation support
https://picom.app/
Other
4.14k stars 588 forks source link

[Feature Request] Remove saturation as an alternative or additional to blurring #336

Open feider opened 4 years ago

feider commented 4 years ago

Expected behavior

Currently, there is the option to blur the background of windows. Additionally, it would be nice if you could set the saturation of the background of windows to a value between 0 and 1. 0 means, the background is converted to gray values (summing up all color channels, then dividing by 3), 1 means, the background colors are left as they are. Values inbetween mean $saturationcolor_image + (1-$saturation)grayvalue_image.

Why

Especially for active windows with high transparency/low opacity (example: semi-transparent terminal emulator with vim running in it, aesthetics>usefulness), blurring much improves the readability of its content. Lowering the saturation would improve it even more.

Summary

Make a new option to decrease the saturation of backgrounds of transparent windows. Makes stuff more readable, looks cool and makes picom even more unique. Also should not be too hard to implement if you already know what's going on in the code.

(I also submitted this FR to compton, but picom is developed more actively)

Clyybber commented 4 years ago

Since desaturation is possible with https://github.com/yshui/picom/wiki/Shader-Shop#grayscale-filter, maybe its a good idea to make it possible to have different shaders apply to different classes of windows (transparent, unfocused, etc.).

feider commented 4 years ago

Thank you for the link, I will see if I can use that for now. Could you give me a hint on how I could use the shader only on the blurred background, not on all windows?

But I agree that it would be nice to be able to write a shader for certain window classes.

Clyybber commented 4 years ago

I don't think its possible right now, but with shaders specific to window classes it would.