Youtube channel !

Be sure to visit my youtube channel

Monday, August 20, 2018

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.

Subscribe To My Channel for updates

Modernizing old php project with the help of AI

0. Keep docker running in separate outside of VSCODE terminal 1. The importance of GIT for version control - create modernization branch 2. ...