Compare commits

...

2 Commits

Author SHA1 Message Date
a5bad7e690 Stalonetray heebiejeebies 2023-08-20 17:06:46 +02:00
56a1a8f87c Added picom shader, fixing stalonetray transparency 2023-08-20 16:11:13 +02:00
4 changed files with 31 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ jgmenu --at-pointer --hide-on-startup &
#(tint2; sleep 10; xdo raise -n tint2) &
## launch tray
stalonetray -v -t --geometry=1x48+0+35 &
stalonetray -v --geometry=1x48+0+35 &
## Screenshot daemon
flameshot &

View File

@@ -98,10 +98,10 @@ bspc rule -a Variety state=floating rectangle=1600x120+0+440
## windows on the desktop. Using it disables negative window gap.
autogap &
## This script balances all windows when new one is spawned
## This script balances all windows when new one is spawned
#euclid_balancer &
##Edge-switcher switches to next workspace when moves moves to the
##Edge-switcher switches to next workspace when moves moves to the
##edge of the monitor (behavior similar to enlightenment)
#edge-switcher &

View File

@@ -0,0 +1,21 @@
#version 330
in vec2 texcoord;
uniform float opacity;
uniform bool invert_color;
uniform sampler2D tex;
vec4 window_shader() {
vec4 c = texelFetch(tex, ivec2(texcoord), 0);
{
// Change vec4(1.0, 1.0, 1.0, 1.0) to your desired color
vec4 vdiff = abs(vec4(0.0, 0.0, 0.0, 1.0) - c);
float diff = max(max(max(vdiff.r, vdiff.g), vdiff.b), vdiff.a);
// Change 0.8 to your desired opacity
if (diff < 0.001)
c *= 0;
}
if (invert_color)
c = vec4(vec3(c.a, c.a, c.a) - vec3(c), c.a);
c *= opacity;
return c;
}

View File

@@ -294,6 +294,13 @@ use-damage = true;
#
# glx-fshader-win = ""
# Use rules to set per-window shaders. Syntax is SHADER_PATH:PATTERN, similar
# to opacity-rule. SHADER_PATH can be "default". This overrides window-shader-fg.
#
window-shader-fg-rule = [
"black_to_transparent.frag:class_g = 'stalonetray'"
]
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#