From 7b0cf9934bc1c045a76323f6c94012ab845e754a Mon Sep 17 00:00:00 2001 From: thomas Date: Wed, 26 Aug 2026 20:14:43 +0100 Subject: [PATCH] migration: lua --- .../hypr/{ => appearance}/animations.lua | 5 ++-- .../.config/hypr/{ => appearance}/colors.lua | 0 .../hypr/{ => appearance}/decorations.lua | 2 +- dotfiles/.config/hypr/{ => core}/env.lua | 0 dotfiles/.config/hypr/{ => core}/hyprmod.lua | 0 dotfiles/.config/hypr/{ => core}/settings.lua | 0 dotfiles/.config/hypr/{ => core}/startup.lua | 0 dotfiles/.config/hypr/hyprland.lua | 28 +++++++++++-------- .../.config/hypr/{ => input}/keybinds.lua | 0 .../.config/hypr/{ => layout}/monitors.lua | 0 .../.config/hypr/{ => layout}/windowrules.lua | 0 .../.config/hypr/{ => layout}/workspaces.lua | 0 .../hypr/{ => presets}/anim-00-default.lua | 0 .../hypr/{ => presets}/anim-01-default-v2.lua | 0 .../hypr/{ => presets}/anim-03-disable.lua | 0 .../.config/hypr/{ => presets}/anim-end-4.lua | 0 .../hypr/{ => presets}/anim-hyde-default.lua | 0 .../{ => presets}/anim-hyde-minimal-1.lua | 0 .../{ => presets}/anim-hyde-minimal-2.lua | 0 .../{ => presets}/anim-hyde-optimized.lua | 0 .../hypr/{ => presets}/anim-hyde-vertical.lua | 0 .../hypr/{ => presets}/anim-mahaveer-1.lua | 0 .../hypr/{ => presets}/anim-mahaveer-2.lua | 0 .../hypr/{ => presets}/anim-ml4w-classic.lua | 0 .../hypr/{ => presets}/anim-ml4w-dynamic.lua | 0 .../hypr/{ => presets}/anim-ml4w-fast.lua | 0 .../hypr/{ => presets}/anim-ml4w-high.lua | 0 .../hypr/{ => presets}/anim-ml4w-moving.lua | 0 .../hypr/{ => presets}/anim-ml4w-standard.lua | 0 29 files changed, 20 insertions(+), 15 deletions(-) rename dotfiles/.config/hypr/{ => appearance}/animations.lua (89%) rename dotfiles/.config/hypr/{ => appearance}/colors.lua (100%) rename dotfiles/.config/hypr/{ => appearance}/decorations.lua (97%) rename dotfiles/.config/hypr/{ => core}/env.lua (100%) rename dotfiles/.config/hypr/{ => core}/hyprmod.lua (100%) rename dotfiles/.config/hypr/{ => core}/settings.lua (100%) rename dotfiles/.config/hypr/{ => core}/startup.lua (100%) rename dotfiles/.config/hypr/{ => input}/keybinds.lua (100%) rename dotfiles/.config/hypr/{ => layout}/monitors.lua (100%) rename dotfiles/.config/hypr/{ => layout}/windowrules.lua (100%) rename dotfiles/.config/hypr/{ => layout}/workspaces.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-00-default.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-01-default-v2.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-03-disable.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-end-4.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-hyde-default.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-hyde-minimal-1.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-hyde-minimal-2.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-hyde-optimized.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-hyde-vertical.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-mahaveer-1.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-mahaveer-2.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-ml4w-classic.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-ml4w-dynamic.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-ml4w-fast.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-ml4w-high.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-ml4w-moving.lua (100%) rename dotfiles/.config/hypr/{ => presets}/anim-ml4w-standard.lua (100%) diff --git a/dotfiles/.config/hypr/animations.lua b/dotfiles/.config/hypr/appearance/animations.lua similarity index 89% rename from dotfiles/.config/hypr/animations.lua rename to dotfiles/.config/hypr/appearance/animations.lua index e5d3b7c..e402fb2 100644 --- a/dotfiles/.config/hypr/animations.lua +++ b/dotfiles/.config/hypr/appearance/animations.lua @@ -2,8 +2,9 @@ -- Ported from UserConfigs/UserAnimations.conf (the active preset) -- -- The 14 alternative presets from animations/*.conf were also ported, flat, as --- anim-*.lua (see the plan) — none of them are wired in. To switch styles, replace --- the body of this file with `require("anim-")`, e.g. require("anim-ml4w-classic"). +-- anim-*.lua (see the plan) — none of them are wired in. They now live in ../presets/. +-- To switch styles, replace the body of this file with `require("presets.anim-")`, +-- e.g. require("presets.anim-ml4w-classic"). hl.config({ animations = { diff --git a/dotfiles/.config/hypr/colors.lua b/dotfiles/.config/hypr/appearance/colors.lua similarity index 100% rename from dotfiles/.config/hypr/colors.lua rename to dotfiles/.config/hypr/appearance/colors.lua diff --git a/dotfiles/.config/hypr/decorations.lua b/dotfiles/.config/hypr/appearance/decorations.lua similarity index 97% rename from dotfiles/.config/hypr/decorations.lua rename to dotfiles/.config/hypr/appearance/decorations.lua index 0d6374e..d031ea0 100644 --- a/dotfiles/.config/hypr/decorations.lua +++ b/dotfiles/.config/hypr/appearance/decorations.lua @@ -6,7 +6,7 @@ -- Animation - https://wiki.hyprland.org/Configuring/Animations/ -- Decoration - https://wiki.hyprland.org/Configuring/Variables/#decoration -local colors = require("colors") +local colors = require("appearance.colors") hl.config({ general = { diff --git a/dotfiles/.config/hypr/env.lua b/dotfiles/.config/hypr/core/env.lua similarity index 100% rename from dotfiles/.config/hypr/env.lua rename to dotfiles/.config/hypr/core/env.lua diff --git a/dotfiles/.config/hypr/hyprmod.lua b/dotfiles/.config/hypr/core/hyprmod.lua similarity index 100% rename from dotfiles/.config/hypr/hyprmod.lua rename to dotfiles/.config/hypr/core/hyprmod.lua diff --git a/dotfiles/.config/hypr/settings.lua b/dotfiles/.config/hypr/core/settings.lua similarity index 100% rename from dotfiles/.config/hypr/settings.lua rename to dotfiles/.config/hypr/core/settings.lua diff --git a/dotfiles/.config/hypr/startup.lua b/dotfiles/.config/hypr/core/startup.lua similarity index 100% rename from dotfiles/.config/hypr/startup.lua rename to dotfiles/.config/hypr/core/startup.lua diff --git a/dotfiles/.config/hypr/hyprland.lua b/dotfiles/.config/hypr/hyprland.lua index dfcbf5b..197ec06 100644 --- a/dotfiles/.config/hypr/hyprland.lua +++ b/dotfiles/.config/hypr/hyprland.lua @@ -2,9 +2,13 @@ -- Ported from hyprland.conf — see https://wiki.hyprland.org/ -- -- This mirrors the old source= chain 1:1, just as require()'d Lua modules instead --- of hyprlang includes. See each file for its origin. The animations/ preset library +-- of hyprlang includes. See each file for its origin. The presets/ preset library -- (anim-*.lua) is also ported but intentionally not required from here — only the --- currently-active style (animations.lua) is wired in, exactly like before. +-- currently-active style (appearance/animations.lua) is wired in, exactly like before. +-- +-- Modules live in subfolders sorted by concern (core/, appearance/, layout/, input/, +-- presets/) — require() paths below use dotted module names, which Lua resolves to +-- the matching subfolder (e.g. require("core.env") -> core/env.lua). -- Initial boot script: applies initial wallpapers, theming, new settings etc. -- suggest not changing/deleting this, including the reference file at ~/.config/hypr/.initial_startup_done @@ -14,17 +18,17 @@ hl.on("hyprland.start", function() end) -- ## This is where you want to start tinkering -require("startup") -- put your start-up packages in startup.lua -require("env") -- Environment variables to load -require("windowrules") -- all about Hyprland Window Rules and Layer Rules -require("decorations") -- Decorations config -require("animations") -- Animation config -require("keybinds") -- Put your own keybinds here -require("settings") -- Main Hyprland Settings +require("core.startup") -- put your start-up packages in core/startup.lua +require("core.env") -- Environment variables to load +require("layout.windowrules") -- all about Hyprland Window Rules and Layer Rules +require("appearance.decorations") -- Decorations config +require("appearance.animations") -- Animation config +require("input.keybinds") -- Put your own keybinds here +require("core.settings") -- Main Hyprland Settings -- nwg-displays / hyprdynamicmonitors -require("monitors") -require("workspaces") +require("layout.monitors") +require("layout.workspaces") -- NOTE: the original hyprland.conf used a plain `exec` (not `exec-once`) here, so it -- re-ran on every `hyprctl reload`, not just at startup. hl.on("hyprland.start", ...) @@ -35,4 +39,4 @@ hl.on("hyprland.start", function() end) -- HyprMod managed settings -require("hyprmod") +require("core.hyprmod") diff --git a/dotfiles/.config/hypr/keybinds.lua b/dotfiles/.config/hypr/input/keybinds.lua similarity index 100% rename from dotfiles/.config/hypr/keybinds.lua rename to dotfiles/.config/hypr/input/keybinds.lua diff --git a/dotfiles/.config/hypr/monitors.lua b/dotfiles/.config/hypr/layout/monitors.lua similarity index 100% rename from dotfiles/.config/hypr/monitors.lua rename to dotfiles/.config/hypr/layout/monitors.lua diff --git a/dotfiles/.config/hypr/windowrules.lua b/dotfiles/.config/hypr/layout/windowrules.lua similarity index 100% rename from dotfiles/.config/hypr/windowrules.lua rename to dotfiles/.config/hypr/layout/windowrules.lua diff --git a/dotfiles/.config/hypr/workspaces.lua b/dotfiles/.config/hypr/layout/workspaces.lua similarity index 100% rename from dotfiles/.config/hypr/workspaces.lua rename to dotfiles/.config/hypr/layout/workspaces.lua diff --git a/dotfiles/.config/hypr/anim-00-default.lua b/dotfiles/.config/hypr/presets/anim-00-default.lua similarity index 100% rename from dotfiles/.config/hypr/anim-00-default.lua rename to dotfiles/.config/hypr/presets/anim-00-default.lua diff --git a/dotfiles/.config/hypr/anim-01-default-v2.lua b/dotfiles/.config/hypr/presets/anim-01-default-v2.lua similarity index 100% rename from dotfiles/.config/hypr/anim-01-default-v2.lua rename to dotfiles/.config/hypr/presets/anim-01-default-v2.lua diff --git a/dotfiles/.config/hypr/anim-03-disable.lua b/dotfiles/.config/hypr/presets/anim-03-disable.lua similarity index 100% rename from dotfiles/.config/hypr/anim-03-disable.lua rename to dotfiles/.config/hypr/presets/anim-03-disable.lua diff --git a/dotfiles/.config/hypr/anim-end-4.lua b/dotfiles/.config/hypr/presets/anim-end-4.lua similarity index 100% rename from dotfiles/.config/hypr/anim-end-4.lua rename to dotfiles/.config/hypr/presets/anim-end-4.lua diff --git a/dotfiles/.config/hypr/anim-hyde-default.lua b/dotfiles/.config/hypr/presets/anim-hyde-default.lua similarity index 100% rename from dotfiles/.config/hypr/anim-hyde-default.lua rename to dotfiles/.config/hypr/presets/anim-hyde-default.lua diff --git a/dotfiles/.config/hypr/anim-hyde-minimal-1.lua b/dotfiles/.config/hypr/presets/anim-hyde-minimal-1.lua similarity index 100% rename from dotfiles/.config/hypr/anim-hyde-minimal-1.lua rename to dotfiles/.config/hypr/presets/anim-hyde-minimal-1.lua diff --git a/dotfiles/.config/hypr/anim-hyde-minimal-2.lua b/dotfiles/.config/hypr/presets/anim-hyde-minimal-2.lua similarity index 100% rename from dotfiles/.config/hypr/anim-hyde-minimal-2.lua rename to dotfiles/.config/hypr/presets/anim-hyde-minimal-2.lua diff --git a/dotfiles/.config/hypr/anim-hyde-optimized.lua b/dotfiles/.config/hypr/presets/anim-hyde-optimized.lua similarity index 100% rename from dotfiles/.config/hypr/anim-hyde-optimized.lua rename to dotfiles/.config/hypr/presets/anim-hyde-optimized.lua diff --git a/dotfiles/.config/hypr/anim-hyde-vertical.lua b/dotfiles/.config/hypr/presets/anim-hyde-vertical.lua similarity index 100% rename from dotfiles/.config/hypr/anim-hyde-vertical.lua rename to dotfiles/.config/hypr/presets/anim-hyde-vertical.lua diff --git a/dotfiles/.config/hypr/anim-mahaveer-1.lua b/dotfiles/.config/hypr/presets/anim-mahaveer-1.lua similarity index 100% rename from dotfiles/.config/hypr/anim-mahaveer-1.lua rename to dotfiles/.config/hypr/presets/anim-mahaveer-1.lua diff --git a/dotfiles/.config/hypr/anim-mahaveer-2.lua b/dotfiles/.config/hypr/presets/anim-mahaveer-2.lua similarity index 100% rename from dotfiles/.config/hypr/anim-mahaveer-2.lua rename to dotfiles/.config/hypr/presets/anim-mahaveer-2.lua diff --git a/dotfiles/.config/hypr/anim-ml4w-classic.lua b/dotfiles/.config/hypr/presets/anim-ml4w-classic.lua similarity index 100% rename from dotfiles/.config/hypr/anim-ml4w-classic.lua rename to dotfiles/.config/hypr/presets/anim-ml4w-classic.lua diff --git a/dotfiles/.config/hypr/anim-ml4w-dynamic.lua b/dotfiles/.config/hypr/presets/anim-ml4w-dynamic.lua similarity index 100% rename from dotfiles/.config/hypr/anim-ml4w-dynamic.lua rename to dotfiles/.config/hypr/presets/anim-ml4w-dynamic.lua diff --git a/dotfiles/.config/hypr/anim-ml4w-fast.lua b/dotfiles/.config/hypr/presets/anim-ml4w-fast.lua similarity index 100% rename from dotfiles/.config/hypr/anim-ml4w-fast.lua rename to dotfiles/.config/hypr/presets/anim-ml4w-fast.lua diff --git a/dotfiles/.config/hypr/anim-ml4w-high.lua b/dotfiles/.config/hypr/presets/anim-ml4w-high.lua similarity index 100% rename from dotfiles/.config/hypr/anim-ml4w-high.lua rename to dotfiles/.config/hypr/presets/anim-ml4w-high.lua diff --git a/dotfiles/.config/hypr/anim-ml4w-moving.lua b/dotfiles/.config/hypr/presets/anim-ml4w-moving.lua similarity index 100% rename from dotfiles/.config/hypr/anim-ml4w-moving.lua rename to dotfiles/.config/hypr/presets/anim-ml4w-moving.lua diff --git a/dotfiles/.config/hypr/anim-ml4w-standard.lua b/dotfiles/.config/hypr/presets/anim-ml4w-standard.lua similarity index 100% rename from dotfiles/.config/hypr/anim-ml4w-standard.lua rename to dotfiles/.config/hypr/presets/anim-ml4w-standard.lua -- 2.49.1