Files
dotfiles/hypr/theme/animations.lua
Timo 900cea0188 hyprland: migrate to Lua config, add pc/laptop profiles
hyprlang has been deprecated since Hyprland 0.55 and is dropped after 1-2
releases; this box runs 0.56.2. Migrate Hyprland's own config to Lua and
split the machine-specific parts into profiles.

Config:
- hyprland.lua entry point; the .conf tree is left in place as a rollback
  path (Hyprland prefers hyprland.lua and only decides at startup).
- Each require() is its own Lua scope, so hyprlang's global "$VAR" no longer
  crosses files: vars.lua / apps.lua / theme/colors.lua return tables.
- hypridle, hyprlock, plugins/* and pyprland.toml stay hyprlang -- the other
  hypr* tools keep it.

Profiles (configs/profiles/):
- pc     -> DP-1 / HDMI-A-1 / DP-2, all 1920x1080
- laptop -> eDP-1 3072x1920@120 scale 2.0, DP-1, HDMI-A-1 mirroring eDP-1
- Each owns its monitors and workspace-to-monitor mapping; common.lua
  generates the 30 workspace rules from the three outputs.
- Selected by $HYPR_PROFILE, else hostname (mainPC -> pc), else laptop.

Fixes:
- pyprland.toml called swww, which is not installed; the wallpaper backend
  here is awww. The rotation timer failed silently and both outputs stayed
  at color: 000000.
- XF86InputRaiseVolume / XF86InputLowerVolume are not real keysyms (no
  XF86Input* family in xkbcommon). They were dead in .conf too; hyprlang
  ignored them silently, hl.bind rejects them. Commented out.
- SUPER+SHIFT+R was bound twice (notification reload + bar reload). hyprlang
  ran both; in Lua the second would shadow the first, so they are merged.
- The waybar layer rule set no effects and was a no-op; dropped.
- Polkit autostart now picks hyprpolkitagent or polkit-gnome by what is
  installed, so one file works on both machines.

Verified with `Hyprland --verify-config` on both profiles (config ok).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01StGBghPW9Dm7z7uj2VNWHr
2026-09-03 18:36:30 +02:00

38 lines
2.8 KiB
Lua

-- Was: theme/animations.conf
hl.config({ animations = { enabled = true } })
-- Curves. hyprlang's `bezier = name, x0, y0, x1, y1` becomes hl.curve with
-- two control points.
hl.curve("default", { type = "bezier", points = { {0.05, 0.9}, {0.1, 1.02} } })
hl.curve("wind", { type = "bezier", points = { {0.05, 0.9}, {0.1, 1.02} } })
hl.curve("overshot", { type = "bezier", points = { {0.13, 0.99}, {0.29, 1.02} } })
hl.curve("liner", { type = "bezier", points = { {1, 1}, {1, 1} } })
hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1.03} } })
-- Fast Animations
-- (old form: animation = <leaf>, <enabled>, <speed>, <curve>, <style>)
hl.animation({ leaf = "windows", enabled = true, speed = 3.5, bezier = "easeOutQuint", style = "popin" })
hl.animation({ leaf = "windowsIn", enabled = true, speed = 3.5, bezier = "easeOutQuint", style = "popin" })
hl.animation({ leaf = "windowsOut", enabled = true, speed = 3.5, bezier = "overshot", style = "popin" })
hl.animation({ leaf = "windowsMove", enabled = true, speed = 3.5, bezier = "overshot", style = "slide" })
hl.animation({ leaf = "layers", enabled = true, speed = 3, bezier = "default", style = "popin" })
hl.animation({ leaf = "fadeIn", enabled = true, speed = 4, bezier = "default" })
hl.animation({ leaf = "fadeOut", enabled = true, speed = 4, bezier = "default" })
hl.animation({ leaf = "fadeSwitch", enabled = true, speed = 4, bezier = "default" })
hl.animation({ leaf = "fadeShadow", enabled = true, speed = 4, bezier = "default" })
hl.animation({ leaf = "fadeDim", enabled = true, speed = 4, bezier = "default" })
hl.animation({ leaf = "fadeLayers", enabled = true, speed = 4, bezier = "default" })
hl.animation({ leaf = "workspaces", enabled = true, speed = 3.25, bezier = "easeOutQuint", style = "slide" })
-- hl.animation({ leaf = "border", enabled = true, speed = 1, bezier = "liner" })
-- hl.animation({ leaf = "borderangle", enabled = true, speed = 30, bezier = "liner", style = "loop" })
-- Slow Animations (was commented out in animations.conf, kept for reference)
-- hl.animation({ leaf = "windows", enabled = true, speed = 7, bezier = "wind", style = "popin" })
-- hl.animation({ leaf = "windowsIn", enabled = true, speed = 6, bezier = "overshot", style = "popin" })
-- hl.animation({ leaf = "windowsOut", enabled = true, speed = 5, bezier = "overshot", style = "popin" })
-- hl.animation({ leaf = "windowsMove", enabled = true, speed = 6, bezier = "overshot", style = "slide" })
-- hl.animation({ leaf = "layers", enabled = true, speed = 4, bezier = "default", style = "popin" })
-- hl.animation({ leaf = "fadeIn", enabled = true, speed = 10, bezier = "default" })
-- hl.animation({ leaf = "workspaces", enabled = true, speed = 6, bezier = "overshot", style = "slide" })