Niri added shaders, fish, DMS, btop, cava
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
animations {
|
||||
workspace-switch {
|
||||
spring damping-ratio=0.85 stiffness=700 epsilon=0.0001
|
||||
}
|
||||
|
||||
horizontal-view-movement {
|
||||
spring damping-ratio=0.85 stiffness=700 epsilon=0.0001
|
||||
}
|
||||
|
||||
window-open {
|
||||
duration-ms 175
|
||||
curve "ease-out-quad"
|
||||
custom-shader r"
|
||||
vec4 zoom_in(vec3 coords_geo, vec3 size_geo) {
|
||||
float progress = niri_clamped_progress;
|
||||
float scale = progress;
|
||||
vec2 coords = (coords_geo.xy - vec2(0.5, 0.5)) * size_geo.xy;
|
||||
coords = coords / scale;
|
||||
coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 0.5), 1.0);
|
||||
vec3 coords_tex = niri_geo_to_tex * coords_geo;
|
||||
vec4 color = texture2D(niri_tex, coords_tex.st);
|
||||
color.a *= progress;
|
||||
|
||||
return color;
|
||||
}
|
||||
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
|
||||
return zoom_in(coords_geo, size_geo);
|
||||
}
|
||||
"
|
||||
}
|
||||
|
||||
// Original by Lemmy: https://github.com/ItsLemmy
|
||||
window-close {
|
||||
duration-ms 200
|
||||
curve "linear"
|
||||
custom-shader r"
|
||||
vec4 fall_and_rotate(vec3 coords_geo, vec3 size_geo) {
|
||||
float progress = niri_clamped_progress * niri_clamped_progress;
|
||||
vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;
|
||||
coords.y -= progress * 1440.0;
|
||||
float random = (niri_random_seed - 0.5) / 2.0;
|
||||
random = sign(random) - random;
|
||||
float max_angle = 0.5 * random;
|
||||
float angle = progress * max_angle;
|
||||
mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
|
||||
coords = rotate * coords;
|
||||
coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);
|
||||
vec3 coords_tex = niri_geo_to_tex * coords_geo;
|
||||
vec4 color = texture2D(niri_tex, coords_tex.st);
|
||||
color.a *= (1.0 - progress);
|
||||
|
||||
return color;
|
||||
}
|
||||
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
|
||||
return fall_and_rotate(coords_geo, size_geo);
|
||||
}
|
||||
"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user