Skip to content

Instantly share code, notes, and snippets.

@insom

insom/shader.sh

Created Jun 23, 2021
Embed
What would you like to do?
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