mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-26 06:02:23 +00:00
Improve niri animation
This commit is contained in:
parent
838319207a
commit
3a8558479b
1 changed files with 29 additions and 20 deletions
|
@ -102,8 +102,11 @@ layout {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// {# if device.laptop() #}
|
// {% if device.laptop() %}
|
||||||
//<yolk> spawn-at-startup "bash" "-c" "swayidle -w timeout 601 'niri msg action power-off-monitors' timeout 600 'hyprlock' before-sleep 'hyprlock' timeout 3600 'systemctl suspend' timeout 60000 'systemctl hibernate'"
|
//<yolk> spawn-at-startup "bash" "-c" "swayidle -w timeout 601 'niri msg action power-off-monitors' timeout 600 'hyprlock' before-sleep 'hyprlock' timeout 3600 'systemctl suspend' timeout 60000 'systemctl hibernate'"
|
||||||
|
//<yolk> spawn-at-startup "waybar"
|
||||||
|
// {% end %}
|
||||||
|
|
||||||
spawn-at-startup "bash" "-c" "eww -c ~/.config/eww-bar open-many bar_1 niri_scroller"
|
spawn-at-startup "bash" "-c" "eww -c ~/.config/eww-bar open-many bar_1 niri_scroller"
|
||||||
spawn-at-startup "xwayland-satellite"
|
spawn-at-startup "xwayland-satellite"
|
||||||
spawn-at-startup "bash" "-c" "1password --silent"
|
spawn-at-startup "bash" "-c" "1password --silent"
|
||||||
|
@ -114,7 +117,6 @@ spawn-at-startup "wl-clip-persist" "--clipboard" "regular"
|
||||||
spawn-at-startup "kdeconnect-indicator"
|
spawn-at-startup "kdeconnect-indicator"
|
||||||
//
|
//
|
||||||
spawn-at-startup "bash" "-c" "swaybg -m fill -i ~/wallpapers/green_leaves.jpg"
|
spawn-at-startup "bash" "-c" "swaybg -m fill -i ~/wallpapers/green_leaves.jpg"
|
||||||
spawn-at-startup "waybar"
|
|
||||||
spawn-at-startup "~/.config/niri/clipsync watch with-notifications"
|
spawn-at-startup "~/.config/niri/clipsync watch with-notifications"
|
||||||
spawn-at-startup
|
spawn-at-startup
|
||||||
//
|
//
|
||||||
|
@ -123,35 +125,41 @@ prefer-no-csd
|
||||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||||
|
|
||||||
animations {
|
animations {
|
||||||
|
window-movement {
|
||||||
|
// duration-ms 200
|
||||||
|
// curve "ease-out-quad"
|
||||||
|
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
|
||||||
|
}
|
||||||
|
horizontal-view-movement {
|
||||||
|
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
|
||||||
|
}
|
||||||
window-open {
|
window-open {
|
||||||
duration-ms 200
|
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
|
||||||
curve "ease-out-quad"
|
// duration-ms 200
|
||||||
|
// curve "ease-out-quad"
|
||||||
custom-shader r"
|
custom-shader r"
|
||||||
float map(float value, float min1, float max1, float min2, float max2) {
|
float map(float value, float min1, float max1, float min2, float max2) {
|
||||||
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
|
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
|
||||||
}
|
}
|
||||||
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
|
vec4 open_color(vec3 coords_geo, vec3 size_geo) {
|
||||||
float cur = niri_clamped_progress;
|
float cur = niri_clamped_progress;
|
||||||
if (coords_geo.x > cur) {
|
if (coords_geo.x > cur) { return vec4(0.0); }
|
||||||
return vec4(0.0);
|
|
||||||
}
|
|
||||||
vec3 coord = vec3(map(coords_geo.x,0.0, cur, 0.0, 1.0 ), coords_geo.y, coords_geo.z);
|
vec3 coord = vec3(map(coords_geo.x,0.0, cur, 0.0, 1.0 ), coords_geo.y, coords_geo.z);
|
||||||
return texture2D(niri_tex, (niri_geo_to_tex * coord).st);
|
return texture2D(niri_tex, (niri_geo_to_tex * coord).st);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
window-close {
|
window-close {
|
||||||
duration-ms 200
|
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
|
||||||
curve "ease-out-quad"
|
// duration-ms 200
|
||||||
|
// curve "ease-out-quad"
|
||||||
custom-shader r"
|
custom-shader r"
|
||||||
float map(float value, float min1, float max1, float min2, float max2) {
|
float map(float value, float min1, float max1, float min2, float max2) {
|
||||||
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
|
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
|
||||||
}
|
}
|
||||||
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
|
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
|
||||||
float cur = 1.0-niri_clamped_progress;
|
float cur = 1.0-niri_clamped_progress;
|
||||||
if (coords_geo.x > cur) {
|
if (coords_geo.x > cur) { return vec4(0.0); }
|
||||||
return vec4(0.0);
|
|
||||||
}
|
|
||||||
vec3 coord = vec3(map(coords_geo.x,0.0, cur, 0.0, 1.0), coords_geo.y, coords_geo.z);
|
vec3 coord = vec3(map(coords_geo.x,0.0, cur, 0.0, 1.0), coords_geo.y, coords_geo.z);
|
||||||
return texture2D(niri_tex, (niri_geo_to_tex * coord).st);
|
return texture2D(niri_tex, (niri_geo_to_tex * coord).st);
|
||||||
}
|
}
|
||||||
|
@ -164,21 +172,22 @@ window-rule {
|
||||||
default-column-width { proportion 0.3333; }
|
default-column-width { proportion 0.3333; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//layer-rule {
|
layer-rule {
|
||||||
//match namespace="^notifications$"
|
match namespace="^notifications$"
|
||||||
//block-out-from "screen-capture"
|
block-out-from "screen-capture"
|
||||||
//}
|
}
|
||||||
|
|
||||||
// Example: block out two password managers from screen capture.
|
|
||||||
// (This example rule is commented out with a "/-" in front.)
|
|
||||||
window-rule {
|
window-rule {
|
||||||
match app-id=r#"1Password"#
|
match app-id=r#"1Password"#
|
||||||
match title=r#"[gG]mail"#
|
match title=r#"[gG]mail"#
|
||||||
match title=r#".*[Ww]hats[aA]pp.*$"#
|
match title=r#".*[Ww]hats[aA]pp.*$"#
|
||||||
// opacity 0.5
|
|
||||||
|
|
||||||
block-out-from "screen-capture"
|
block-out-from "screen-capture"
|
||||||
}
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^1Password$"#
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
window-rule {
|
window-rule {
|
||||||
match app-id=r#"^[gG]edit$"#;
|
match app-id=r#"^[gG]edit$"#;
|
||||||
|
|
Loading…
Reference in a new issue