diff --git a/config/hypr/hyprland.lua b/config/hypr/hyprland.lua index 6836e3cc..30eafe11 100644 --- a/config/hypr/hyprland.lua +++ b/config/hypr/hyprland.lua @@ -1,5 +1,16 @@ -- Learn how to configure Hyprland: https://wiki.hypr.land/Configuring/Start/ +-- Force re-evaluation of Omarchy modules on every hyprctl reload. Lua caches +-- already-required modules in package.loaded, so without this clear, changes +-- to default/hypr/*.lua (and user ~/.config/hypr/*.lua) in a checkout wouldn't +-- take effect after `hyprctl reload` even though hyprland.lua re-runs. +-- Cheap: package.loaded is small. +for k in pairs(package.loaded) do + if k:match("^default%.hypr") or k:match("^hypr%.") then + package.loaded[k] = nil + end +end + -- Load user modules from ~/.config and Omarchy defaults from $OMARCHY_PATH. package.path = os.getenv("HOME") .. "/.config/?.lua;"