-- looknfeel.lua — the springy animation rice from the dotfiles' hypr/looknfeel.lua
-- (daemon-sec-dotfiles/home/.config/hypr/looknfeel.lua), carried on 2026-10-08.
--
-- Loaded after core.lua, which pins the square corners, blur and borders. This
-- file adds what the carried version added on Omarchy: overshoot curves on
-- window motion (the "bouncy" / wobbly feel), shadows, blur tuning, snapping
-- while dragging, manual-drag physics, swallowing, and two touchpad gestures.
-- Left out on purpose: the omarchy-* layer rule (caelestia.lua has the
-- Caelestia one), the `pop` rounding rule (rounding is 0 everywhere already),
-- and the 4-finger-down gesture (bindings.lua binds it to the dropdown terminal).
hl.config({
decoration = {
rounding = 0,
active_opacity = 1.0,
inactive_opacity = 1.0, -- kitty keeps its own transparency in its config
dim_inactive = false,
shadow = {
enabled = true,
range = 24,
render_power = 3,
color = "rgba(00000055)",
},
blur = {
enabled = true,
size = 7,
passes = 3,
new_optimizations = true,
xray = true, -- blur the wallpaper, not other tiled windows
popups = true,
noise = 0.015,
contrast = 1.1,
brightness = 1.0,
},
},
})
-- Hyprland's stock curves live in its own share/hypr/hyprland.lua, which this
-- home-manager config does not load, so the ones used below are defined here
-- (same control points as upstream).
hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } })
hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1.0 } } })
hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1.0 } } })
-- Overshoot curves: control points with y > 1 push past the target and settle
-- back, which is what reads as "springy" in a compositor without jelly deformation.
hl.curve("overshoot", { type = "bezier", points = { { 0.34, 1.56 }, { 0.64, 1.0 } } })
hl.curve("springy", { type = "bezier", points = { { 0.16, 1.36 }, { 0.30, 1.02 } } })
hl.curve("snappy", { type = "bezier", points = { { 0.05, 0.9 }, { 0.10, 1.05 } } })
hl.curve("squish", { type = "bezier", points = { { 0.40, -0.20 }, { 0.20, 1.30 } } })
-- Window motion: dragging, tiling and resizing all overshoot slightly and settle.
hl.animation({ leaf = "windows", enabled = true, speed = 4.6, bezier = "overshoot" })
hl.animation({ leaf = "windowsIn", enabled = true, speed = 5.0, bezier = "springy", style = "popin 60%" })
hl.animation({ leaf = "windowsOut", enabled = true, speed = 3.4, bezier = "squish", style = "popin 70%" })
hl.animation({ leaf = "windowsMove", enabled = true, speed = 4.4, bezier = "overshoot" })
-- Borders track the spring instead of lagging behind it.
hl.animation({ leaf = "border", enabled = true, speed = 7.0, bezier = "snappy" })
-- Fades: quick enough to stay out of the way.
hl.animation({ leaf = "fade", enabled = true, speed = 4.5, bezier = "quick" })
hl.animation({ leaf = "fadeIn", enabled = true, speed = 3.2, bezier = "almostLinear" })
hl.animation({ leaf = "fadeOut", enabled = true, speed = 2.4, bezier = "almostLinear" })
-- Workspace switching: slide with a fade tail; the dropdown terminal rides slidevert.
hl.animation({ leaf = "workspaces", enabled = true, speed = 5.0, bezier = "overshoot", style = "slidefade 15%" })
hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 4.6, bezier = "springy", style = "slidevert" })
-- Layer surfaces (bar, launcher, notifications) pop in with the same character.
hl.animation({ leaf = "layers", enabled = true, speed = 4.5, bezier = "springy" })
hl.animation({ leaf = "layersIn", enabled = true, speed = 4.5, bezier = "springy", style = "popin 80%" })
hl.animation({ leaf = "layersOut", enabled = true, speed = 3.0, bezier = "linear", style = "popin 85%" })
-- The border gradient angle can be animated; left off so the GPU can idle.
-- hl.animation({ leaf = "borderangle", enabled = true, speed = 40, bezier = "linear", style = "loop" })
hl.config({
general = {
-- Floating windows snap to each other and to screen edges while dragging.
snap = {
enabled = true,
window_gap = 12,
monitor_gap = 12,
respect_gaps = true,
},
},
misc = {
-- Manual drags and resizes ride the curves above: the window lags the
-- cursor and settles with overshoot (poor man's wobbly windows).
animate_manual_resizes = true,
animate_mouse_windowdragging = true,
-- Launch a GUI app from a terminal and the terminal hides until it exits.
enable_swallow = true,
swallow_regex = "^(kitty|foot|org\\.codeberg\\.dnkl\\.foot|Alacritty|com\\.mitchellh\\.ghostty)$",
},
})
-- Touchpad: 3-finger horizontal surfs workspaces with the slidefade above;
-- 4-finger up toggles fullscreen (4-finger down is the dropdown terminal, bindings.lua).
hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })
hl.gesture({ fingers = 4, direction = "up", action = "fullscreen" })