looknfeel.lua (5011B)
1 -- looknfeel.lua — the springy animation rice from the dotfiles' hypr/looknfeel.lua 2 -- (daemon-sec-dotfiles/home/.config/hypr/looknfeel.lua), carried on 2026-10-08. 3 -- 4 -- Loaded after core.lua, which pins the square corners, blur and borders. This 5 -- file adds what the carried version added on Omarchy: overshoot curves on 6 -- window motion (the "bouncy" / wobbly feel), shadows, blur tuning, snapping 7 -- while dragging, manual-drag physics, swallowing, and two touchpad gestures. 8 -- Left out on purpose: the omarchy-* layer rule (caelestia.lua has the 9 -- Caelestia one), the `pop` rounding rule (rounding is 0 everywhere already), 10 -- and the 4-finger-down gesture (bindings.lua binds it to the dropdown terminal). 11 12 hl.config({ 13 decoration = { 14 rounding = 0, 15 active_opacity = 1.0, 16 inactive_opacity = 1.0, -- kitty keeps its own transparency in its config 17 dim_inactive = false, 18 19 shadow = { 20 enabled = true, 21 range = 24, 22 render_power = 3, 23 color = "rgba(00000055)", 24 }, 25 26 blur = { 27 enabled = true, 28 size = 7, 29 passes = 3, 30 new_optimizations = true, 31 xray = true, -- blur the wallpaper, not other tiled windows 32 popups = true, 33 noise = 0.015, 34 contrast = 1.1, 35 brightness = 1.0, 36 }, 37 }, 38 }) 39 40 -- Hyprland's stock curves live in its own share/hypr/hyprland.lua, which this 41 -- home-manager config does not load, so the ones used below are defined here 42 -- (same control points as upstream). 43 hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } }) 44 hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1.0 } } }) 45 hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1.0 } } }) 46 47 -- Overshoot curves: control points with y > 1 push past the target and settle 48 -- back, which is what reads as "springy" in a compositor without jelly deformation. 49 hl.curve("overshoot", { type = "bezier", points = { { 0.34, 1.56 }, { 0.64, 1.0 } } }) 50 hl.curve("springy", { type = "bezier", points = { { 0.16, 1.36 }, { 0.30, 1.02 } } }) 51 hl.curve("snappy", { type = "bezier", points = { { 0.05, 0.9 }, { 0.10, 1.05 } } }) 52 hl.curve("squish", { type = "bezier", points = { { 0.40, -0.20 }, { 0.20, 1.30 } } }) 53 54 -- Window motion: dragging, tiling and resizing all overshoot slightly and settle. 55 hl.animation({ leaf = "windows", enabled = true, speed = 4.6, bezier = "overshoot" }) 56 hl.animation({ leaf = "windowsIn", enabled = true, speed = 5.0, bezier = "springy", style = "popin 60%" }) 57 hl.animation({ leaf = "windowsOut", enabled = true, speed = 3.4, bezier = "squish", style = "popin 70%" }) 58 hl.animation({ leaf = "windowsMove", enabled = true, speed = 4.4, bezier = "overshoot" }) 59 60 -- Borders track the spring instead of lagging behind it. 61 hl.animation({ leaf = "border", enabled = true, speed = 7.0, bezier = "snappy" }) 62 63 -- Fades: quick enough to stay out of the way. 64 hl.animation({ leaf = "fade", enabled = true, speed = 4.5, bezier = "quick" }) 65 hl.animation({ leaf = "fadeIn", enabled = true, speed = 3.2, bezier = "almostLinear" }) 66 hl.animation({ leaf = "fadeOut", enabled = true, speed = 2.4, bezier = "almostLinear" }) 67 68 -- Workspace switching: slide with a fade tail; the dropdown terminal rides slidevert. 69 hl.animation({ leaf = "workspaces", enabled = true, speed = 5.0, bezier = "overshoot", style = "slidefade 15%" }) 70 hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 4.6, bezier = "springy", style = "slidevert" }) 71 72 -- Layer surfaces (bar, launcher, notifications) pop in with the same character. 73 hl.animation({ leaf = "layers", enabled = true, speed = 4.5, bezier = "springy" }) 74 hl.animation({ leaf = "layersIn", enabled = true, speed = 4.5, bezier = "springy", style = "popin 80%" }) 75 hl.animation({ leaf = "layersOut", enabled = true, speed = 3.0, bezier = "linear", style = "popin 85%" }) 76 77 -- The border gradient angle can be animated; left off so the GPU can idle. 78 -- hl.animation({ leaf = "borderangle", enabled = true, speed = 40, bezier = "linear", style = "loop" }) 79 80 hl.config({ 81 general = { 82 -- Floating windows snap to each other and to screen edges while dragging. 83 snap = { 84 enabled = true, 85 window_gap = 12, 86 monitor_gap = 12, 87 respect_gaps = true, 88 }, 89 }, 90 misc = { 91 -- Manual drags and resizes ride the curves above: the window lags the 92 -- cursor and settles with overshoot (poor man's wobbly windows). 93 animate_manual_resizes = true, 94 animate_mouse_windowdragging = true, 95 -- Launch a GUI app from a terminal and the terminal hides until it exits. 96 enable_swallow = true, 97 swallow_regex = "^(kitty|foot|org\\.codeberg\\.dnkl\\.foot|Alacritty|com\\.mitchellh\\.ghostty)$", 98 }, 99 }) 100 101 -- Touchpad: 3-finger horizontal surfs workspaces with the slidefade above; 102 -- 4-finger up toggles fullscreen (4-finger down is the dropdown terminal, bindings.lua). 103 hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) 104 hl.gesture({ fingers = 4, direction = "up", action = "fullscreen" })