Skip to content

Instantly share code, notes, and snippets.

@insom
Created June 23, 2021 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save insom/88c473a0980b43b59fcbabc64650513d to your computer and use it in GitHub Desktop.
Save insom/88c473a0980b43b59fcbabc64650513d to your computer and use it in GitHub Desktop.
Amber Screen Shader
#!/bin/bash
# original b&w version from gemini://perso.pw/blog//articles/xorg-black-and-white.gmi
# which was itself inspired by https://github.com/bubbleguuum/toggle-monitor-grayscale
picom --backend glx --glx-fshader-win "uniform sampler2D tex;
uniform float opacity;
void main() {
vec4 c = texture2D(tex, gl_TexCoord[0].xy);
float y = dot(c.rgb, vec3(0.2126, 0.7152, 0.0722));
gl_FragColor = opacity*vec4(y, y, y, c.a)*vec4(1.0,0.75,0.1,1.0);
}" 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment