Niri added shaders, fish, DMS, btop, cava

This commit is contained in:
2026-05-08 20:33:29 +02:00
parent 6cac58b55a
commit 810de91316
23 changed files with 1473 additions and 45 deletions
+2 -2
View File
@@ -183,8 +183,8 @@
"browserPickerViewMode": "grid",
"browserUsageHistory": {
"firefox": {
"count": 5,
"lastUsed": 1777836758285,
"count": 7,
"lastUsed": 1778183026350,
"name": "Firefox"
}
},
+1 -1
View File
@@ -68,7 +68,7 @@ update_ms = 2000
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "user"
proc_sorting = "cpu lazy"
#* Reverse sorting order, True or False.
proc_reversed = false
+47 -37
View File
@@ -241,43 +241,53 @@
[color]
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
# default is to keep current terminal color
; background = default
; foreground = default
# SDL and sdl_glsl only support hex code colors, these are the default:
; background = '#111111'
; foreground = '#33ffff'
# Gradient mode, only hex defined colors are supported,
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
# You can define as many as 8 different colors. They range from bottom to top of screen
; gradient = 0
; gradient_color_1 = '#59cc33'
; gradient_color_2 = '#80cc33'
; gradient_color_3 = '#a6cc33'
; gradient_color_4 = '#cccc33'
; gradient_color_5 = '#cca633'
; gradient_color_6 = '#cc8033'
; gradient_color_7 = '#cc5933'
; gradient_color_8 = '#cc3333'
# Horizontal is only supported on noncurses output.
# Only one color will be calculated per bar.
; horizontal_gradient = 0
; horizontal_gradient_color_1 = '#c45161'
; horizontal_gradient_color_2 = '#e094a0'
; horizontal_gradient_color_3 = '#f2b6c0'
; horizontal_gradient_color_4 = '#f2dde1'
; horizontal_gradient_color_5 = '#cbc7d8'
; horizontal_gradient_color_6 = '#8db7d2'
; horizontal_gradient_color_7 = '#5e62a9'
; horizontal_gradient_color_8 = '#434279'
# Rose pine color config
# background = '#191724'
gradient = 1
gradient_count = 6
gradient_color_1 = '#31748f'
gradient_color_2 = '#9ccfd8'
gradient_color_3 = '#c4a7e7'
gradient_color_4 = '#ebbcba'
gradient_color_5 = '#f6c177'
gradient_color_6 = '#eb6f92'
# # Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# # Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
# # a terminal that can change color definitions such as Gnome-terminal or rxvt.
# # default is to keep current terminal color
# ; background = default
# ; foreground = default
#
# # SDL and sdl_glsl only support hex code colors, these are the default:
# ; background = '#111111'
# ; foreground = '#33ffff'
#
#
# # Gradient mode, only hex defined colors are supported,
# # background must also be defined in hex or remain commented out. 1 = on, 0 = off.
# # You can define as many as 8 different colors. They range from bottom to top of screen
# ; gradient = 0
# ; gradient_color_1 = '#59cc33'
# ; gradient_color_2 = '#80cc33'
# ; gradient_color_3 = '#a6cc33'
# ; gradient_color_4 = '#cccc33'
# ; gradient_color_5 = '#cca633'
# ; gradient_color_6 = '#cc8033'
# ; gradient_color_7 = '#cc5933'
# ; gradient_color_8 = '#cc3333'
#
#
# # Horizontal is only supported on noncurses output.
# # Only one color will be calculated per bar.
# ; horizontal_gradient = 0
# ; horizontal_gradient_color_1 = '#c45161'
# ; horizontal_gradient_color_2 = '#e094a0'
# ; horizontal_gradient_color_3 = '#f2b6c0'
# ; horizontal_gradient_color_4 = '#f2dde1'
# ; horizontal_gradient_color_5 = '#cbc7d8'
# ; horizontal_gradient_color_6 = '#8db7d2'
# ; horizontal_gradient_color_7 = '#5e62a9'
# ; horizontal_gradient_color_8 = '#434279'
# If both vertical and horizontal gradient is enabled, vertical will be blended in this direction.
+3
View File
@@ -132,3 +132,6 @@ alias nvimf="nvim (kitten choose-file)"
# dotfiles
alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
# Visuals
alias cavabg='$HOME/Dev/Scripts/cava-wallpaper.sh'
+4
View File
@@ -307,3 +307,7 @@ include "dms/outputs.kdl"
include "dms/cursor.kdl"
include "dms/windowrules.kdl"
// Include animations
include "custom/animations.kdl"
+2
View File
@@ -0,0 +1,2 @@
include "~/.config/niri/custom/animations/smoke.kdl"
+65
View File
@@ -0,0 +1,65 @@
animations {
workspace-switch {
spring damping-ratio=0.9 stiffness=800 epsilon=0.0001
}
horizontal-view-movement {
spring damping-ratio=0.9 stiffness=800 epsilon=0.0001
}
window-open {
duration-ms 200
curve "linear"
custom-shader r"
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
float p0 = niri_clamped_progress;
float p = smoothstep(0.0, 1.0, p0);
vec2 size = size_geo.xy;
vec2 center = size * 0.5;
vec2 pos = coords_geo.xy * size;
float scale = mix(0.01, 1.0, p);
vec2 scaled_pos = (pos - center) / scale + center;
vec2 uv = scaled_pos / size;
if (uv.x < 0.0 || uv.x > 1.0 ||
uv.y < 0.0 || uv.y > 1.0) {
return vec4(0.0, 0.0, 0.0, 0.0);
}
return texture2D(niri_tex, uv);
}
"
}
window-close {
duration-ms 300
curve "linear"
custom-shader r"
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
float p0 = niri_clamped_progress;
float p = smoothstep(0.0, 1.0, p0);
vec2 size = size_geo.xy;
vec2 center = size * 0.5;
vec2 pos = coords_geo.xy * size;
float scale = mix(1.0, 0.01, p);
vec2 scaled_pos = (pos - center) / scale + center;
vec2 uv = scaled_pos / size;
if (uv.x < 0.0 || uv.x > 1.0 ||
uv.y < 0.0 || uv.y > 1.0) {
return vec4(0.0, 0.0, 0.0, 0.0);
}
return texture2D(niri_tex, uv);
}
"
}
}
@@ -0,0 +1,133 @@
// Burn Effect with Ashes - Windows burn with 8 random ember colors, floating ash, and glowing sparks
//
// Adjustable parameters:
// - uv * 8.0: Edge roughness - higher = finer burn pattern
// - threshold * 0.8: Burn reach - how far burn extends into window
// - 0.08: Glow width - width of ember glow line
// - 150.0 in ash_particle: Ash size - higher = smaller particles
// - 280.0 in ember_spark: Spark size - higher = smaller sparks
// - Loop counts (7.0, 8.0): Particle layers - more = more particles (performance impact)
animations {
window-open {
duration-ms 400
curve "linear"
custom-shader r"
float hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
float noise(vec2 p) {
vec2 i = floor(p); vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),
mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x), f.y);
}
vec3 get_ember_colors(float seed, out vec3 inner, out vec3 outer) {
if (seed < 0.125) { inner = vec3(1.0, 0.3, 0.0); outer = vec3(1.0, 0.8, 0.2); } // orange
else if (seed < 0.250) { inner = vec3(0.2, 0.4, 1.0); outer = vec3(0.5, 0.8, 1.0); } // blue
else if (seed < 0.375) { inner = vec3(0.6, 0.1, 0.9); outer = vec3(0.9, 0.5, 1.0); } // purple
else if (seed < 0.500) { inner = vec3(0.1, 0.8, 0.2); outer = vec3(0.5, 1.0, 0.3); } // green
else if (seed < 0.625) { inner = vec3(1.0, 0.1, 0.4); outer = vec3(1.0, 0.5, 0.7); } // pink
else if (seed < 0.750) { inner = vec3(0.0, 0.8, 0.9); outer = vec3(0.7, 1.0, 1.0); } // cyan
else if (seed < 0.875) { inner = vec3(0.9, 0.7, 0.1); outer = vec3(1.0, 1.0, 0.8); } // gold
else { inner = vec3(0.8, 0.2, 0.1); outer = vec3(1.0, 0.5, 0.2); } // red
return inner;
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) return vec4(0.0);
float progress = niri_clamped_progress;
vec2 uv = coords_geo.xy;
vec3 coords_tex = niri_geo_to_tex * vec3(uv, 1.0);
vec4 color = texture2D(niri_tex, coords_tex.st);
float edge_dist = min(min(uv.x, 1.0 - uv.x), min(uv.y, 1.0 - uv.y));
float n = noise(uv * 8.0 + niri_random_seed * 100.0) * 0.3;
float burn_line = edge_dist + n;
float threshold = progress * 0.8;
vec3 ember_inner, ember_outer;
get_ember_colors(niri_random_seed, ember_inner, ember_outer);
if (burn_line < threshold - 0.08) return color;
else if (burn_line < threshold) {
vec3 ember = mix(ember_inner, ember_outer, (burn_line - threshold + 0.08) / 0.08);
return vec4(mix(ember, color.rgb, 0.3), color.a);
} else return vec4(0.0);
}
"
}
window-close {
duration-ms 600
curve "linear"
custom-shader r"
float hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
float noise(vec2 p) {
vec2 i = floor(p); vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),
mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x), f.y);
}
vec3 get_ember_colors(float seed, out vec3 inner, out vec3 outer) {
if (seed < 0.125) { inner = vec3(1.0, 0.3, 0.0); outer = vec3(1.0, 0.8, 0.2); }
else if (seed < 0.250) { inner = vec3(0.2, 0.4, 1.0); outer = vec3(0.5, 0.8, 1.0); }
else if (seed < 0.375) { inner = vec3(0.6, 0.1, 0.9); outer = vec3(0.9, 0.5, 1.0); }
else if (seed < 0.500) { inner = vec3(0.1, 0.8, 0.2); outer = vec3(0.5, 1.0, 0.3); }
else if (seed < 0.625) { inner = vec3(1.0, 0.1, 0.4); outer = vec3(1.0, 0.5, 0.7); }
else if (seed < 0.750) { inner = vec3(0.0, 0.8, 0.9); outer = vec3(0.7, 1.0, 1.0); }
else if (seed < 0.875) { inner = vec3(0.9, 0.7, 0.1); outer = vec3(1.0, 1.0, 0.8); }
else { inner = vec3(0.8, 0.2, 0.1); outer = vec3(1.0, 0.5, 0.2); }
return inner;
}
float ash_particle(vec2 uv, float seed) {
float pn = noise(uv * 150.0 + seed * 50.0);
return pn < 0.78 ? 0.0 : (pn - 0.78) / 0.22;
}
float ember_spark(vec2 uv, float seed) {
float sn = hash(floor(uv * 280.0) + seed * 100.0);
return sn < 0.982 ? 0.0 : pow((sn - 0.982) / 0.018, 2.0);
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress;
vec2 uv = coords_geo.xy;
vec3 ember_inner, ember_outer;
get_ember_colors(niri_random_seed, ember_inner, ember_outer);
vec4 particles = vec4(0.0);
for (float i = 0.0; i < 7.0; i++) {
float ls = niri_random_seed + i * 0.1;
vec2 auv = uv; auv.y += progress * (0.25 + i * 0.12);
auv.x += progress * (noise(vec2(i, ls) * 10.0) - 0.5) * 0.4 + sin(progress * 6.28 + i * 1.5) * 0.03;
float ed = min(min(auv.x, 1.0 - auv.x), min(auv.y, 1.0 - auv.y));
float sz = progress * 0.75;
if (ed < sz && ed > 0.0) {
float p = ash_particle(auv, ls);
float fade = (1.0 - smoothstep(0.0, sz, ed)) * (1.0 - progress * 0.4);
particles.rgb += mix(ember_outer * 0.5, vec3(0.3), 0.4 + i * 0.1) * p * fade * 0.7;
particles.a += p * fade * 0.5;
}
}
for (float j = 0.0; j < 8.0; j++) {
float ss = niri_random_seed + j * 0.17 + 0.5;
vec2 suv = uv; suv.y += progress * (0.4 + j * 0.1);
suv.x += progress * (hash(vec2(j, ss)) - 0.5) * 0.5 + sin(progress * 10.0 + j * 2.0) * 0.025;
float ed = min(min(suv.x, 1.0 - suv.x), min(suv.y, 1.0 - suv.y));
float sz = progress * 0.7;
if (ed < sz && ed > 0.0) {
float sp = ember_spark(suv, ss);
float fade = (1.0 - smoothstep(0.0, sz * 0.8, ed)) * (1.0 - progress * 0.6);
float flicker = 0.7 + 0.3 * sin(progress * 20.0 + j * 3.0);
particles.rgb += ember_inner * sp * fade * flicker * 1.5;
particles.a += sp * fade * 0.8;
}
}
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) return particles;
vec3 coords_tex = niri_geo_to_tex * vec3(uv, 1.0);
vec4 color = texture2D(niri_tex, coords_tex.st);
float edge_dist = min(min(uv.x, 1.0 - uv.x), min(uv.y, 1.0 - uv.y));
float n = noise(uv * 8.0 + niri_random_seed * 100.0) * 0.3;
float burn_line = edge_dist + n;
float threshold = progress * 0.8;
if (burn_line > threshold + 0.08) return color + particles;
else if (burn_line > threshold) {
vec3 ember = mix(ember_inner, ember_outer, 1.0 - (burn_line - threshold) / 0.08);
return vec4(mix(ember, color.rgb, 0.3), color.a) + particles;
} else return particles;
}
"
}
}
@@ -0,0 +1,158 @@
// Burn effect with 8 randomly selected ember colors
// Colors: orange, blue, purple, green, pink, cyan, gold, deep red
// See burn-README.md for customization guide
animations {
workspace-switch {
duration-ms 300
curve "ease-out-cubic"
}
window-open {
duration-ms 500
curve "linear"
custom-shader r"
float hash(vec2 p) {
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
}
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),
mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x), f.y);
}
vec3 get_ember_colors(float seed, out vec3 inner, out vec3 outer) {
if (seed < 0.125) {
inner = vec3(1.0, 0.3, 0.0); // orange
outer = vec3(1.0, 0.8, 0.2);
} else if (seed < 0.25) {
inner = vec3(0.2, 0.4, 1.0); // blue
outer = vec3(0.5, 0.8, 1.0);
} else if (seed < 0.375) {
inner = vec3(0.6, 0.1, 0.9); // purple
outer = vec3(0.9, 0.5, 1.0);
} else if (seed < 0.5) {
inner = vec3(0.1, 0.8, 0.2); // green
outer = vec3(0.5, 1.0, 0.3);
} else if (seed < 0.625) {
inner = vec3(1.0, 0.1, 0.4); // pink
outer = vec3(1.0, 0.5, 0.7);
} else if (seed < 0.75) {
inner = vec3(0.0, 0.8, 0.9); // cyan
outer = vec3(0.7, 1.0, 1.0);
} else if (seed < 0.875) {
inner = vec3(0.9, 0.7, 0.1); // gold
outer = vec3(1.0, 1.0, 0.8);
} else {
inner = vec3(0.8, 0.2, 0.1); // deep red
outer = vec3(1.0, 0.5, 0.2);
}
return inner;
}
vec4 burn_open(vec3 coords_geo, vec3 size_geo) {
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) {
return vec4(0.0);
}
float progress = niri_clamped_progress;
vec2 uv = coords_geo.xy;
vec3 coords_tex = niri_geo_to_tex * vec3(uv, 1.0);
vec4 color = texture2D(niri_tex, coords_tex.st);
float edge_dist = min(min(uv.x, 1.0 - uv.x), min(uv.y, 1.0 - uv.y));
float n = noise(uv * 8.0 + niri_random_seed * 100.0) * 0.3;
float burn_line = edge_dist + n;
float threshold = progress * 0.8;
vec3 ember_inner, ember_outer;
get_ember_colors(niri_random_seed, ember_inner, ember_outer);
if (burn_line < threshold - 0.08) {
return color;
} else if (burn_line < threshold) {
vec3 ember = mix(ember_inner, ember_outer, (burn_line - threshold + 0.08) / 0.08);
return vec4(mix(ember, color.rgb, 0.3), color.a);
} else {
return vec4(0.0);
}
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
return burn_open(coords_geo, size_geo);
}
"
}
window-close {
duration-ms 500
curve "linear"
custom-shader r"
float hash(vec2 p) {
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
}
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),
mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x), f.y);
}
vec3 get_ember_colors(float seed, out vec3 inner, out vec3 outer) {
if (seed < 0.125) {
inner = vec3(1.0, 0.3, 0.0); // orange
outer = vec3(1.0, 0.8, 0.2);
} else if (seed < 0.25) {
inner = vec3(0.2, 0.4, 1.0); // blue
outer = vec3(0.5, 0.8, 1.0);
} else if (seed < 0.375) {
inner = vec3(0.6, 0.1, 0.9); // purple
outer = vec3(0.9, 0.5, 1.0);
} else if (seed < 0.5) {
inner = vec3(0.1, 0.8, 0.2); // green
outer = vec3(0.5, 1.0, 0.3);
} else if (seed < 0.625) {
inner = vec3(1.0, 0.1, 0.4); // pink
outer = vec3(1.0, 0.5, 0.7);
} else if (seed < 0.75) {
inner = vec3(0.0, 0.8, 0.9); // cyan
outer = vec3(0.7, 1.0, 1.0);
} else if (seed < 0.875) {
inner = vec3(0.9, 0.7, 0.1); // gold
outer = vec3(1.0, 1.0, 0.8);
} else {
inner = vec3(0.8, 0.2, 0.1); // deep red
outer = vec3(1.0, 0.5, 0.2);
}
return inner;
}
vec4 burn_close(vec3 coords_geo, vec3 size_geo) {
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) {
return vec4(0.0);
}
float progress = niri_clamped_progress;
vec2 uv = coords_geo.xy;
vec3 coords_tex = niri_geo_to_tex * vec3(uv, 1.0);
vec4 color = texture2D(niri_tex, coords_tex.st);
float edge_dist = min(min(uv.x, 1.0 - uv.x), min(uv.y, 1.0 - uv.y));
float n = noise(uv * 8.0 + niri_random_seed * 100.0) * 0.3;
float burn_line = edge_dist + n;
float threshold = progress * 0.8;
vec3 ember_inner, ember_outer;
get_ember_colors(niri_random_seed, ember_inner, ember_outer);
if (burn_line > threshold + 0.08) {
return color;
} else if (burn_line > threshold) {
vec3 ember = mix(ember_inner, ember_outer, 1.0 - (burn_line - threshold) / 0.08);
return vec4(mix(ember, color.rgb, 0.3), color.a);
} else {
return vec4(0.0);
}
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
return burn_close(coords_geo, size_geo);
}
"
}
}
+99
View File
@@ -0,0 +1,99 @@
// Traditional burn appearance, orange glowy look
animations {
workspace-switch {
duration-ms 300
curve "ease-out-cubic"
}
window-open {
duration-ms 500
curve "linear"
custom-shader r"
float hash(vec2 p) {
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
}
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),
mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x), f.y);
}
vec4 burn_open(vec3 coords_geo, vec3 size_geo) {
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) {
return vec4(0.0);
}
float progress = niri_clamped_progress;
vec2 uv = coords_geo.xy;
vec3 coords_tex = niri_geo_to_tex * vec3(uv, 1.0);
vec4 color = texture2D(niri_tex, coords_tex.st);
float edge_dist = min(min(uv.x, 1.0 - uv.x), min(uv.y, 1.0 - uv.y));
float n = noise(uv * 8.0 + niri_random_seed * 100.0) * 0.3;
float burn_line = edge_dist + n;
float threshold = progress * 0.8;
vec3 ember_inner = vec3(1.0, 0.3, 0.0);
vec3 ember_outer = vec3(1.0, 0.8, 0.2);
if (burn_line < threshold - 0.08) {
return color;
} else if (burn_line < threshold) {
vec3 ember = mix(ember_inner, ember_outer, (burn_line - threshold + 0.08) / 0.08);
return vec4(mix(ember, color.rgb, 0.3), color.a);
} else {
return vec4(0.0);
}
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
return burn_open(coords_geo, size_geo);
}
"
}
window-close {
duration-ms 500
curve "linear"
custom-shader r"
float hash(vec2 p) {
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
}
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),
mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x), f.y);
}
vec4 burn_close(vec3 coords_geo, vec3 size_geo) {
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) {
return vec4(0.0);
}
float progress = niri_clamped_progress;
vec2 uv = coords_geo.xy;
vec3 coords_tex = niri_geo_to_tex * vec3(uv, 1.0);
vec4 color = texture2D(niri_tex, coords_tex.st);
float edge_dist = min(min(uv.x, 1.0 - uv.x), min(uv.y, 1.0 - uv.y));
float n = noise(uv * 8.0 + niri_random_seed * 100.0) * 0.3;
float burn_line = edge_dist + n;
float threshold = progress * 0.8;
vec3 ember_inner = vec3(1.0, 0.3, 0.0);
vec3 ember_outer = vec3(1.0, 0.8, 0.2);
if (burn_line > threshold + 0.08) {
return color;
} else if (burn_line > threshold) {
vec3 ember = mix(ember_inner, ember_outer, 1.0 - (burn_line - threshold) / 0.08);
return vec4(mix(ember, color.rgb, 0.3), color.a);
} else {
return vec4(0.0);
}
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
return burn_close(coords_geo, size_geo);
}
"
}
}
@@ -0,0 +1,118 @@
animations {
workspace-switch {
spring damping-ratio=0.80 stiffness=523 epsilon=0.0001
}
window-open {
duration-ms 400
curve "ease-out-expo"
custom-shader r"
vec4 door_rise(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress;
// Tilt from 90 degrees (flat) to 0 degrees (upright)
float tilt = (1.0 - progress) * 1.57079632;
// Pivot point at bottom edge
vec2 coords = coords_geo.xy * size_geo.xy;
coords.y = size_geo.y - coords.y;
// Distance from pivot (bottom edge)
float dist_from_pivot = coords.y;
// Calculate 3D position
// Negative z_offset so it goes away from viewer (backward)
float z_offset = -dist_from_pivot * sin(tilt);
float y_compressed = dist_from_pivot * cos(tilt);
// Apply perspective based on depth
float perspective = 600.0;
float perspective_scale = perspective / (perspective + z_offset);
// Scale everything by perspective
coords.x = (coords.x - size_geo.x * 0.5) * perspective_scale + size_geo.x * 0.5;
coords.y = y_compressed * perspective_scale;
// Flip Y back to normal coordinates
coords.y = size_geo.y - coords.y;
coords_geo = vec3(coords / size_geo.xy, 1.0);
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 color = texture2D(niri_tex, coords_tex.st);
// Brighten as it rises
float brightness = 0.4 + 0.6 * progress;
color.rgb *= brightness;
return color * progress;
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
return door_rise(coords_geo, size_geo);
}"
}
window-close {
duration-ms 400
curve "ease-out-expo"
custom-shader r"
vec4 bob_and_slide(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress;
float y_offset = 0.0;
// Bob phase (0.0 to 0.25) - goes up then back to 0
if (progress < 0.25) {
float t = progress / 0.25;
// Parabola: goes up to peak at t=0.5, back down to 0 at t=1.0
y_offset = -40.0 * (1.0 - 4.0 * (t - 0.5) * (t - 0.5));
}
// Slide phase (0.25 to 1.0) - slides down
else {
float slide_progress = (progress - 0.25) / 0.75;
y_offset = -slide_progress * (size_geo.y + 100.0);
}
// Apply transformation
vec2 coords = coords_geo.xy * size_geo.xy;
coords.y = coords.y + y_offset;
coords_geo = vec3(coords / size_geo.xy, 1.0);
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 color = texture2D(niri_tex, coords_tex.st);
return color;
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
return bob_and_slide(coords_geo, size_geo);
}"
}
horizontal-view-movement {
spring damping-ratio=0.65 stiffness=423 epsilon=0.0001
}
window-movement {
spring damping-ratio=0.65 stiffness=300 epsilon=0.0001
}
window-resize {
custom-shader r"
vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
vec3 coords_tex_next = niri_geo_to_tex_next * coords_curr_geo;
vec4 color = texture2D(niri_tex_next, coords_tex_next.st);
return color;
}
"
}
config-notification-open-close {
spring damping-ratio=0.65 stiffness=923 epsilon=0.001
}
screenshot-ui-open {
duration-ms 200
curve "ease-out-quad"
}
overview-open-close {
spring damping-ratio=0.85 stiffness=800 epsilon=0.0001
}
}
+68
View File
@@ -0,0 +1,68 @@
// Glitch Effect - Chromatic aberration with CRT scanlines
// Windows open/close with RGB channel splitting and scanline overlay
//
// Adjustable parameters:
// - split (0.04): RGB split intensity - higher = more separation
// - scanline (0.08): Scanline visibility - higher = more prominent
// - uv.y * 400.0: Scanline density - higher = more lines
animations {
window-open {
duration-ms 400
curve "linear"
custom-shader r"
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) return vec4(0.0);
float progress = niri_clamped_progress;
float glitch = 1.0 - progress;
vec2 uv = coords_geo.xy;
// RGB channel splitting - channels converge as window opens
float split = glitch * 0.04;
vec3 cr = niri_geo_to_tex * vec3(uv + vec2(split, 0.0), 1.0);
vec3 cg = niri_geo_to_tex * vec3(uv, 1.0);
vec3 cb = niri_geo_to_tex * vec3(uv - vec2(split, 0.0), 1.0);
float r = texture2D(niri_tex, cr.st).r;
float g = texture2D(niri_tex, cg.st).g;
float b = texture2D(niri_tex, cb.st).b;
float a = texture2D(niri_tex, cg.st).a;
vec3 color = vec3(r, g, b);
// CRT scanline effect
float scanline = 1.0 - 0.08 + 0.08 * sin(uv.y * 400.0);
return vec4(color * scanline, a * progress);
}
"
}
window-close {
duration-ms 600
curve "linear"
custom-shader r"
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) return vec4(0.0);
float progress = niri_clamped_progress;
vec2 uv = coords_geo.xy;
// RGB channel splitting - channels separate as window closes
float split = progress * 0.04;
vec3 cr = niri_geo_to_tex * vec3(uv + vec2(split, 0.0), 1.0);
vec3 cg = niri_geo_to_tex * vec3(uv, 1.0);
vec3 cb = niri_geo_to_tex * vec3(uv - vec2(split, 0.0), 1.0);
float r = texture2D(niri_tex, cr.st).r;
float g = texture2D(niri_tex, cg.st).g;
float b = texture2D(niri_tex, cb.st).b;
float a = texture2D(niri_tex, cg.st).a;
vec3 color = vec3(r, g, b);
// CRT scanline effect
float scanline = 1.0 - 0.08 + 0.08 * sin(uv.y * 400.0);
return vec4(color * scanline, a * (1.0 - progress));
}
"
}
}
@@ -0,0 +1,77 @@
animations {
workspace-switch {
duration-ms 300
curve "ease-out-cubic"
}
window-open {
duration-ms 400
curve "linear"
custom-shader r"
vec4 pixelate_open(vec3 coords_geo, vec3 size_geo) {
// Discard pixels outside window bounds
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) {
return vec4(0.0);
}
float progress = niri_clamped_progress;
float border_width = 0.008; // Adjust based on your border size
vec2 coords = coords_geo.xy;
// Check if we're in the border region
bool in_border = coords.x < border_width || coords.x > (1.0 - border_width) ||
coords.y < border_width || coords.y > (1.0 - border_width);
// Only pixelate the inner content, not the border
if (!in_border) {
float pixel_size = (1.0 - progress) * 0.1;
if (pixel_size > 0.0) {
coords = floor(coords / pixel_size) * pixel_size + pixel_size * 0.5;
}
// Clamp sampling to avoid border area
coords = clamp(coords, border_width, 1.0 - border_width);
}
vec3 new_coords = vec3(coords, 1.0);
vec3 coords_tex = niri_geo_to_tex * new_coords;
vec4 color = texture2D(niri_tex, coords_tex.st);
color.a *= progress;
return color;
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
return pixelate_open(coords_geo, size_geo);
}
"
}
window-close {
duration-ms 400
curve "linear"
custom-shader r"
vec4 pixelate_close(vec3 coords_geo, vec3 size_geo) {
// Discard pixels outside window bounds
if (coords_geo.x < 0.0 || coords_geo.x > 1.0 || coords_geo.y < 0.0 || coords_geo.y > 1.0) {
return vec4(0.0);
}
float progress = niri_clamped_progress;
float border_width = 0.008;
vec2 coords = coords_geo.xy;
// Check if we're in the border region
bool in_border = coords.x < border_width || coords.x > (1.0 - border_width) ||
coords.y < border_width || coords.y > (1.0 - border_width);
// Only pixelate the inner content, not the border
if (!in_border) {
float pixel_size = progress * 0.1;
if (pixel_size > 0.0) {
coords = floor(coords / pixel_size) * pixel_size + pixel_size * 0.5;
}
// Clamp sampling to avoid border area
coords = clamp(coords, border_width, 1.0 - border_width);
}
vec3 new_coords = vec3(coords, 1.0);
vec3 coords_tex = niri_geo_to_tex * new_coords;
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 pixelate_close(coords_geo, size_geo);
}
"
}
}
@@ -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);
}
"
}
}
+147
View File
@@ -0,0 +1,147 @@
//This was a nightmare to make but here
// original code from; https://github.com/XansiVA
animations {
workspace-switch {
spring damping-ratio=0.80 stiffness=523 epsilon=0.0001
}
window-open {
duration-ms 600
curve "ease-out-quad"
custom-shader "
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress;
// Completely random angle (0 to 2*PI)
float random_angle = niri_random_seed * 6.28318;
// Rotate the coordinates to create tilted ribbons
vec2 coords = coords_geo.xy - 0.5;
float cos_a = cos(random_angle);
float sin_a = sin(random_angle);
vec2 rotated = vec2(
coords.x * cos_a - coords.y * sin_a,
coords.x * sin_a + coords.y * cos_a
);
// Now work with rotated Y position for ribbon indexing
float y_pos = rotated.y + 0.5;
// Equal-sized ribbons (20 total)
float ribbon_count = 20.0;
float ribbon_index = floor(y_pos * ribbon_count);
// Alternating pattern: even = left, odd = right
float direction = mod(ribbon_index, 2.0) == 0.0 ? -1.0 : 1.0;
// Cascading delay
float delay = ribbon_index / ribbon_count * 0.5;
float ribbon_progress = clamp((progress - delay) / (1.0 - delay), 0.0, 1.0);
// Slide along the rotated X axis
rotated.x += (1.0 - ribbon_progress) * direction * 2.0;
// Rotate back to get final coordinates
coords = vec2(
rotated.x * cos_a + rotated.y * sin_a,
-rotated.x * sin_a + rotated.y * cos_a
);
coords += 0.5;
// Regular sampling
vec3 coords_tex = niri_geo_to_tex * vec3(coords.x, coords.y, 1.0);
vec4 color = texture2D(niri_tex, coords_tex.xy);
// Check if ribbon hasn't arrived yet
if (coords.x < 0.0 || coords.x > 1.0) {
return vec4(0.0);
}
return color;
}"
}
window-close {
duration-ms 800
curve "ease-out-quad"
custom-shader "
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress;
// Completely random angle (0 to 2*PI)
float random_angle = niri_random_seed * 6.28318;
// Rotate the coordinates to create tilted ribbons
vec2 coords = coords_geo.xy - 0.5; // center
float cos_a = cos(random_angle);
float sin_a = sin(random_angle);
vec2 rotated = vec2(
coords.x * cos_a - coords.y * sin_a,
coords.x * sin_a + coords.y * cos_a
);
// Now work with rotated Y position for ribbon indexing
float y_pos = rotated.y + 0.5;
// Equal-sized ribbons (20 total)
float ribbon_count = 20.0;
float ribbon_index = floor(y_pos * ribbon_count);
// Alternating pattern: even = left, odd = right
float direction = mod(ribbon_index, 2.0) == 0.0 ? -1.0 : 1.0;
// Cascading delay
float delay = ribbon_index / ribbon_count * 0.5;
float ribbon_progress = clamp((progress - delay) / (1.0 - delay), 0.0, 1.0);
// Slide along the rotated X axis
rotated.x += ribbon_progress * direction * 2.0;
// Rotate back to get final coordinates
coords = vec2(
rotated.x * cos_a + rotated.y * sin_a,
-rotated.x * sin_a + rotated.y * cos_a
);
coords += 0.5; // uncenter
// Regular sampling
vec3 coords_tex = niri_geo_to_tex * vec3(coords.x, coords.y, 1.0);
vec4 color = texture2D(niri_tex, coords_tex.xy);
// Check if ribbon has moved out of bounds
if (coords.x < 0.0 || coords.x > 1.0) {
return vec4(0.0);
}
return color;
}"
}
horizontal-view-movement {
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
}
window-movement {
spring damping-ratio=0.75 stiffness=323 epsilon=0.0001
}
window-resize {
custom-shader r"
vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
vec3 coords_tex_next = niri_geo_to_tex_next * coords_curr_geo;
vec4 color = texture2D(niri_tex_next, coords_tex_next.st);
return color;
}
"
}
config-notification-open-close {
spring damping-ratio=0.65 stiffness=923 epsilon=0.001
}
screenshot-ui-open {
duration-ms 200
curve "ease-out-quad"
}
overview-open-close {
spring damping-ratio=0.85 stiffness=800 epsilon=0.0001
}
}
@@ -0,0 +1,44 @@
animations {
workspace-switch {
spring damping-ratio=0.80 stiffness=523 epsilon=0.0001
}
window-open {
duration-ms 1000
curve "ease-out-expo"
custom-shader "vec4 fall_from_top(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress * niri_clamped_progress;
vec2 coords = (coords_geo.xy - vec2(0.5, 0.0)) * size_geo.xy;
coords.y += (1.0 - progress) * 1440.0;
float max_angle = mix(-0.5, 0.5, floor(niri_random_seed * 4.0) / 3.0);
float angle = (1.0 - 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, 0.0), 1.0);
vec3 coords_tex = niri_geo_to_tex * coords_geo;
return texture2D(niri_tex, coords_tex.st);
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
return fall_from_top(coords_geo, size_geo);
}"
}
window-close {
duration-ms 1000
curve "linear"
custom-shader "vec4 fall_to_bottom(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress * niri_clamped_progress;
vec2 coords = (coords_geo.xy - vec2(0.5, 0.0)) * size_geo.xy;
coords.y -= progress * 1440.0;
float max_angle = mix(-0.5, 0.5, floor(niri_random_seed * 4.0) / 3.0);
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, 0.0), 1.0);
vec3 coords_tex = niri_geo_to_tex * coords_geo;
return texture2D(niri_tex, coords_tex.st);
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
return fall_to_bottom(coords_geo, size_geo);
}"
}
}
+148
View File
@@ -0,0 +1,148 @@
animations {
window-open {
duration-ms 1000
curve "ease-out-cubic"
custom-shader r"
float hash(vec2 p) {
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
}
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
float a = hash(i);
float b = hash(i + vec2(1.0, 0.0));
float c = hash(i + vec2(0.0, 1.0));
float d = hash(i + vec2(1.0, 1.0));
return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
}
float fbm(vec2 p) {
float v = 0.0;
float amp = 0.5;
for (int i = 0; i < 6; i++) {
v += amp * noise(p);
p *= 2.0;
amp *= 0.5;
}
return v;
}
float warpedFbm(vec2 p, float t) {
vec2 q = vec2(fbm(p + vec2(0.0, 0.0)),
fbm(p + vec2(5.2, 1.3)));
vec2 r = vec2(fbm(p + 6.0 * q + vec2(1.7, 9.2) + 0.25 * t),
fbm(p + 6.0 * q + vec2(8.3, 2.8) + 0.22 * t));
vec2 s = vec2(fbm(p + 5.0 * r + vec2(3.1, 7.4) + 0.18 * t),
fbm(p + 5.0 * r + vec2(6.7, 0.9) + 0.2 * t));
return fbm(p + 6.0 * s);
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
float p = niri_clamped_progress;
vec2 uv = coords_geo.xy;
float seed = niri_random_seed * 100.0;
float t = p * 12.0 + seed;
float fluid = warpedFbm(uv * 2.0 + seed, t);
vec2 center = uv - 0.5;
float dist = length(center * vec2(1.0, 0.7));
float appear = (1.0 - dist * 1.2) + (1.0 - fluid) * 0.7;
float reveal = smoothstep(appear + 0.5, appear - 0.5, (1.0 - p) * 1.8);
float distort_strength = (1.0 - p) * (1.0 - p) * 0.35;
vec2 wq = vec2(fbm(uv * 2.0 + vec2(0.0, t * 0.2)),
fbm(uv * 2.0 + vec2(5.2, t * 0.2)));
vec2 wr = vec2(fbm(uv * 2.0 + 4.0 * wq + vec2(1.7, 9.2)),
fbm(uv * 2.0 + 4.0 * wq + vec2(8.3, 2.8)));
vec2 warped_uv = uv + (wr - 0.5) * distort_strength;
vec3 tex_coords = niri_geo_to_tex * vec3(warped_uv, 1.0);
vec4 color = texture2D(niri_tex, tex_coords.st);
return color * reveal;
}
"
}
window-close{
duration-ms 1000
curve "ease-out-cubic"
custom-shader r"
float hash(vec2 p) {
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
}
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
float a = hash(i);
float b = hash(i + vec2(1.0, 0.0));
float c = hash(i + vec2(0.0, 1.0));
float d = hash(i + vec2(1.0, 1.0));
return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
}
float fbm(vec2 p) {
float v = 0.0;
float amp = 0.5;
for (int i = 0; i < 6; i++) {
v += amp * noise(p);
p *= 2.0;
amp *= 0.5;
}
return v;
}
float warpedFbm(vec2 p, float t) {
vec2 q = vec2(fbm(p + vec2(0.0, 0.0)),
fbm(p + vec2(5.2, 1.3)));
vec2 r = vec2(fbm(p + 6.0 * q + vec2(1.7, 9.2) + 0.25 * t),
fbm(p + 6.0 * q + vec2(8.3, 2.8) + 0.22 * t));
vec2 s = vec2(fbm(p + 5.0 * r + vec2(3.1, 7.4) + 0.18 * t),
fbm(p + 5.0 * r + vec2(6.7, 0.9) + 0.2 * t));
return fbm(p + 6.0 * s);
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
float p = niri_clamped_progress;
vec2 uv = coords_geo.xy;
float seed = niri_random_seed * 100.0;
float t = p * 12.0 + seed;
float fluid = warpedFbm(uv * 2.0 + seed, t);
vec2 center = uv - 0.5;
float dist = length(center * vec2(1.0, 0.7));
float dissolve = (1.0 - dist) * 1.2 + fluid * 0.7;
float remain = smoothstep(dissolve + 0.5, dissolve - 0.5, p * 1.8);
float distort_strength = p * p * 0.4;
vec2 wq = vec2(fbm(uv * 2.0 + vec2(0.0, t * 0.2)),
fbm(uv * 2.0 + vec2(5.2, t * 0.2)));
vec2 wr = vec2(fbm(uv * 2.0 + 4.0 * wq + vec2(1.7, 9.2)),
fbm(uv * 2.0 + 4.0 * wq + vec2(8.3, 2.8)));
vec2 warped_uv = uv + (wr - 0.5) * distort_strength;
vec3 tex_coords = niri_geo_to_tex * vec3(warped_uv, 1.0);
vec4 color = texture2D(niri_tex, tex_coords.st);
float tail = smoothstep(1.0, 0.8, p);
return color * remain * tail;
}
"
}
}
@@ -0,0 +1,120 @@
//Original code; https://github/XansiVA
animations {
workspace-switch {
spring damping-ratio=0.80 stiffness=523 epsilon=0.0001
}
window-open {
duration-ms 1400
curve "ease-out-expo"
custom-shader r"
float ease_curve(float x) {
return x < 0.5 ? 4.0*x*x*x : 1.0 - pow(-2.0*x + 2.0, 3.0)/2.0;
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
float t = niri_clamped_progress;
float prog = ease_curve(t);
// bottom-right corner
vec2 start = vec2(1.0, 1.0);
// compute distance along diagonal from corner
vec2 p = coords_geo.xy;
vec2 dir = vec2(-1.0, -1.0); // vector toward top-left
float dist = dot(p - start, dir);
// normalize distance to max diagonal (from corner to opposite)
float max_diag = 2.0;
float norm_dist = dist / max_diag;
// pixels not yet reached by sweep are invisible
if (norm_dist > prog) {
return vec4(0.0);
}
// sample normally
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 col = texture2D(niri_tex, coords_tex.xy);
return col;
}"
}
window-close {
duration-ms 1400
curve "ease-out-expo"
custom-shader r"
// ease-in-out cubic curve helper
float ease_curve(float x) {
return x < 0.5 ? 4.0*x*x*x : 1.0 - pow(-2.0*x + 2.0, 3.0)/2.0;
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
float t = niri_clamped_progress;
float prog = ease_curve(t);
// choose corner: 0=top-left,1=top-right,2=bottom-left,3=bottom-right
int corner = 0;
vec2 start;
if (corner == 0) start = vec2(0.0,0.0);
else if (corner == 1) start = vec2(1.0,0.0);
else if (corner == 2) start = vec2(0.0,1.0);
else start = vec2(1.0,1.0);
// compute distance along diagonal from corner
vec2 p = coords_geo.xy;
float dist = dot(p - start, vec2(1.0,1.0));
// normalize distance to max diagonal
float max_diag = 2.0; // max of vec2(1,1)
float norm_dist = dist / max_diag;
// If pixel is behind the sweeping line, make it invisible
if (norm_dist <= prog) {
return vec4(0.0);
}
// sample normally
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 col = texture2D(niri_tex, coords_tex.xy);
return col;
}"
}
horizontal-view-movement {
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
}
window-movement {
spring damping-ratio=0.75 stiffness=323 epsilon=0.0001
}
window-resize {
custom-shader r"
vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
vec3 coords_tex_next = niri_geo_to_tex_next * coords_curr_geo;
vec4 color = texture2D(niri_tex_next, coords_tex_next.st);
return color;
}
"
}
config-notification-open-close {
spring damping-ratio=0.65 stiffness=923 epsilon=0.001
}
screenshot-ui-open {
duration-ms 200
curve "ease-out-quad"
}
overview-open-close {
spring damping-ratio=0.85 stiffness=800 epsilon=0.0001
}
}
+131
View File
@@ -0,0 +1,131 @@
//Original written by; https://github.com/XansiVA
animations {
workspace-switch {
spring damping-ratio=0.80 stiffness=523 epsilon=0.0001
}
window-open {
duration-ms 700
curve "ease-out-expo"
custom-shader r"
vec4 line_expand(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress;
// Add extra easing on top of the curve
float eased_progress = progress * progress * (3.0 - 2.0 * progress); // smoothstep
// Calculate the center of the window
float window_center_y = size_geo.y * 0.5;
// Current pixel's Y position
float pixel_y = coords_geo.y * size_geo.y;
// Distance from center
float dist_from_center = abs(pixel_y - window_center_y);
// How much of the window should be visible
float visible_radius = (size_geo.y * 0.5) * eased_progress;
// If outside visible area, hide it
if (dist_from_center > visible_radius) {
return vec4(0.0);
}
// Draw a bright line at the expanding edges (top and bottom)
float edge_thickness = 3.0;
bool at_edge = abs(dist_from_center - visible_radius) < edge_thickness;
// Show the pixel
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 color = texture2D(niri_tex, coords_tex.st);
// Make the edge line bright white
if (at_edge && eased_progress < 0.99) {
color.rgb = mix(color.rgb, vec3(1.0, 1.0, 1.0), 0.8);
}
return color;
}
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
return line_expand(coords_geo, size_geo);
}"
}
window-close {
duration-ms 500
curve "ease-out-expo"
custom-shader r"
vec4 line_collapse(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress;
// Add extra easing on top of the curve
float eased_progress = progress * progress * (3.0 - 2.0 * progress); // smoothstep
// Reverse the progress so it goes from full to line
float reversed_progress = 1.0 - eased_progress;
// Calculate the center of the window
float window_center_y = size_geo.y * 0.5;
// Current pixel's Y position
float pixel_y = coords_geo.y * size_geo.y;
// Distance from center
float dist_from_center = abs(pixel_y - window_center_y);
// How much of the window should be visible (shrinking)
float visible_radius = (size_geo.y * 0.5) * reversed_progress;
// If outside visible area, hide it
if (dist_from_center > visible_radius) {
return vec4(0.0);
}
// Draw a bright line at the collapsing edges
float edge_thickness = 2.0;
bool at_edge = abs(dist_from_center - visible_radius) < edge_thickness;
// Show the pixel
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 color = texture2D(niri_tex, coords_tex.st);
// Make the edge line bright white
if (at_edge && reversed_progress > 0.01) {
color.rgb = mix(color.rgb, vec3(1.0, 1.0, 1.0), 0.8);
}
return color;
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
return line_collapse(coords_geo, size_geo);
}"
}
horizontal-view-movement {
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
}
window-movement {
spring damping-ratio=0.75 stiffness=323 epsilon=0.0001
}
window-resize {
custom-shader r"
vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
vec3 coords_tex_next = niri_geo_to_tex_next * coords_curr_geo;
vec4 color = texture2D(niri_tex_next, coords_tex_next.st);
return color;
}
"
}
config-notification-open-close {
spring damping-ratio=0.95 stiffness=923 epsilon=0.02
}
screenshot-ui-open {
duration-ms 300
curve "ease-out-quad"
}
overview-open-close {
spring damping-ratio=0.85 stiffness=800 epsilon=0.0001
}
}
+6 -5
View File
@@ -1,27 +1,28 @@
{
"LazyVim": { "branch": "main", "commit": "83d90f339defdb109a6ede333865a66ffc7ef6aa" },
"SchemaStore.nvim": { "branch": "main", "commit": "1ccbd3720b5064146b16d7761957da302ea1e86f" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" },
"conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"fzf-lua": { "branch": "main", "commit": "64590411e6cf3d603d1e1bdad3a3d051f2f5a91a" },
"fzf-lua": { "branch": "main", "commit": "33fe4b6f0c817c4d99a7baeea82c4d17e57efd64" },
"gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" },
"grug-far.nvim": { "branch": "main", "commit": "21790e59dd0109a92a70cb874dd002af186314f5" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" },
"mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" },
"mini.ai": { "branch": "main", "commit": "43eb2074843950a3a25aae56a5f41362ec043bfa" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "51feb0ada33d18f3c5c71ffb46005dbf8b33bef4" },
"mason.nvim": { "branch": "main", "commit": "e54f5bf5f12c560da31c17eee5b3e1bd369f3ff9" },
"mini.ai": { "branch": "main", "commit": "7e10ce8468c0fce4f527ae2c0e5c484f7667f73d" },
"mini.hipatterns": { "branch": "main", "commit": "9eff319bbe66adfaf781a0d0e174baa08ba94909" },
"mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" },
"mini.pairs": { "branch": "main", "commit": "42387c7fe68fc0b6e95eaf37f1bb76e7bffaa0d9" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" },
"nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" },
"nvim-lspconfig": { "branch": "master", "commit": "451d4ef9abd4f0f08e379ef0d55d1c391b6125a7" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
+3
View File
@@ -1,6 +1,9 @@
{
"extras": [
"lazyvim.plugins.extras.editor.fzf",
"lazyvim.plugins.extras.lang.docker",
"lazyvim.plugins.extras.lang.git",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.util.dot",
"lazyvim.plugins.extras.util.mini-hipatterns"
],