Enabling grayscale in Gnome, KDE, LxQT and Windows

Windows 7
Negative Screen
https://zerowidthjoiner.net/Uploads/negativescreen/Binary.zip

Windows 10
there is already present grayscale mode: from the Turn color filters on or off

Gnome:
install an extension called: Desaturate_all  Note: to run the script successfully just comment the two lines: 

//  x_fill: true,

//  y_fill: false, inside extension.js
 

https://extensions.gnome.org/



KDE:
https://github.com/ugjka/kwin-effect-grayscale
Ubuntu/Debian:
install: sudo apt install kwin-dev libkf5xmlgui-dev libkf5service-dev libkf5globalaccel-dev libkf5configwidgets-dev qt5-default
git clone https://github.com/ugjka/kwin-effect-grayscale.git cd kwin-effect-grayscale mkdir build && cd build cmake .. -DCMAKE_C_FLAGS:STRING="" -DCMAKE_CXX_FLAGS:STRING="" -DCMAKE_EXE_LINKER_FLAGS:STRING="" -DCMAKE_SHARED_LINKER_FLAGS:STRING="" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib make sudo make install
Then enable the grayscale color filter from Desktop Effects menu

LxQt:
create a filter file: grayscale.glsl with the following contents:
uniform float opacity;
uniform bool invert_color;
uniform sampler2D tex;

void main() {
vec4 c = texture2D(tex, gl_TexCoord[0].xy);
float y = dot(c.rgb, vec3(0.299, 0.587, 0.114));
// y = 1.0 -y;
gl_FragColor = vec4(y, y, y, 1.0);
}
then just apply the filter with:
compton --backend glx --glx-fshader-win "$(cat ./grayscale.glsl)"

Please enjoy a less distractive / addictive world.

Author Photo

About Nevyan Neykov

I do web design and development for more than 15 years. Have been working in various companies dealing mainly with PHP and JavaScript. Independently as well as in teams, I am involved in design and development of user friendly websites. Exploring the new aspects of JavaScript language such as ES6, as well as the Angular framework and how to apply them in practice. Nowadays I find dealing with Docker / Kubernetes and Linux system administration compelling. @youtube: https://www.youtube.com/channel/UC69XQPDbEpfAtO5S2-ZyNoA at udemy: https://www.udemy.com/user/nevyan-neykov/ Have a nice day !

View Full Profile →