feat(hyprdrive): tune beacon notification open/close animation

- beacon: snappier in-app dissolve (OUTRO_DURATION 0.4 -> 0.2).
- hyprland.lua: split the global `layers` animation into layersIn/layersOut
  so open and close differ. layersIn keeps the springy myBezier slide-in;
  layersOut slides the surface back off-screen with a new easeInQuint-ish
  `slideOutLate` curve — it creeps slowly then whips away in the final
  quarter, instead of a uniform fade.
- windowrules.lua: drop `no_anim` from the beacon layerrule (keep blur) so
  notification cards ride those layer animations again (they slid in/out via
  the global anim before, since no per-namespace no_anim was deployed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-07-21 20:37:22 +02:00
parent b7eba3f967
commit 6ef9f31dee
3 changed files with 20 additions and 9 deletions

View File

@ -41,7 +41,7 @@ class HologramOverlay:
EDGE_FADE_Y = 34.0 # smooth vertical fade-out
INTRO_DURATION = 0.9 # brisk 'materialise out of static' when a card pops in
INTRO_STATIC = 900 # static specks at the very start of the intro
OUTRO_DURATION = 0.4 # quick reverse dissolve back into static on dismiss
OUTRO_DURATION = 0.2 # snappy reverse dissolve back into static on dismiss
def __init__(self, enabled: bool = True, clip_func=None, fade_widget=None,
intro_duration: float | None = None) -> None:

View File

@ -167,6 +167,12 @@ hl.config({
-- final position rather than gliding to a dead stop. This gives the DE an energetic feel.
hl.curve("myBezier", { type = "bezier", points = { {0.05, 0.9}, {0.1, 1.05} } })
-- Strong ease-in for the layer *close* slide (easeInQuint-ish): the surface creeps
-- slowly for the first ~3/4 of the animation and only whips off-screen in the final
-- quarter, so a dismissed notification lingers then snaps away rather than fading out
-- uniformly all at once.
hl.curve("slideOutLate", { type = "bezier", points = { {0.64, 0.0}, {0.78, 0.0} } })
-- Window open and resize animation uses the custom spring curve.
-- speed = 7 (Hyprland internal units; higher = faster) keeps the open feeling snappy.
hl.animation({ leaf = "windows", enabled = true, speed = 7, bezier = "myBezier" })
@ -192,11 +198,15 @@ hl.animation({ leaf = "fade", enabled = true, speed = 7, bezier = "
hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 10, bezier = "default", style = "slidevert" })
-- Layer-shell surfaces (the astal-menu control centre, notifications, the bar) slide
-- in from their anchored edge with the bouncy myBezier curve, so opening the menu
-- reads as a springy slide-down rather than a plain fade. (A per-namespace layerrule
-- in from their anchored edge with the bouncy myBezier curve, so opening reads as a
-- springy slide-down rather than a plain fade. In/out are split: the *close* also
-- slides off-screen, but with the slideOutLate ease-in so it lingers slowly then whips
-- away in the final quarter instead of fading out uniformly. beacon notification cards
-- ride this — springy slide-in, slow-then-fast slide-out. (A per-namespace layerrule
-- was tried but this hyprlua build doesn't honour its animation timing; the global
-- `layers` leaf does.)
hl.animation({ leaf = "layers", enabled = true, speed = 5, bezier = "myBezier", style = "slide" })
-- layersIn/layersOut leaves do.)
hl.animation({ leaf = "layersIn", enabled = true, speed = 5, bezier = "myBezier", style = "slide" })
hl.animation({ leaf = "layersOut", enabled = true, speed = 7, bezier = "slideOutLate", style = "slide" })
--------------
---- DEVICE ---

View File

@ -129,11 +129,12 @@ end
-- beacon (our notification daemon, namespace "beacon") renders holographic
-- notification cards. Blur what shows through their translucent violet glass so
-- they read as the same frosted holo panels as the menus. no_anim: each card
-- materialises out of static via its own in-app hologram intro, so the compositor
-- should map the surface in place rather than slide it.
-- they read as the same frosted holo panels as the menus. Unlike the persistent
-- panels above, beacon deliberately keeps the global layer animation (no no_anim):
-- cards slide in from the top (layersIn, springy) and slide back off-screen on
-- dismiss (layersOut) with the slow-then-fast slideOutLate ease-in.
hl.layer_rule({ name = "cosmoshell-blur-beacon", match = { namespace = "beacon" },
blur = true, ignore_alpha = 0.1, no_anim = true })
blur = true, ignore_alpha = 0.1 })
-- smart gaps
hl.workspace_rule({ workspace = "w[tv1]s[false]", gaps_out = 0, gaps_in = 0 })