diff --git a/config/hypr/hyprland.lua b/config/hypr/hyprland.lua index 0d2da621..0fdaf400 100644 --- a/config/hypr/hyprland.lua +++ b/config/hypr/hyprland.lua @@ -1,33 +1,14 @@ -- Learn how to configure Hyprland: https://wiki.hypr.land/Configuring/Start/ -local home = os.getenv("HOME") or "" +-- Load user modules from ~/.config and Omarchy defaults from $OMARCHY_PATH. +package.path = os.getenv("HOME") + .. "/.config/?.lua;" + .. (os.getenv("OMARCHY_PATH") or (os.getenv("HOME") .. "/.local/share/omarchy")) + .. "/?.lua;" + .. package.path --- Hyprland recommends require() for split Lua configs. These two roots let us --- load user modules from ~/.config and Omarchy defaults from $OMARCHY_PATH. -package.path = home .. "/.config/?.lua;" .. (os.getenv("OMARCHY_PATH") or (home .. "/.local/share/omarchy")) .. "/?.lua;" .. package.path - -local paths = require("default.hypr.paths") -require("default.hypr.helpers") - --- Use Omarchy defaults, but don't edit these directly. -require("default.hypr.autostart") -require("default.hypr.bindings.media") -require("default.hypr.bindings.clipboard") -require("default.hypr.bindings.tiling-v2") -require("default.hypr.bindings.utilities") -require("default.hypr.envs") -require("default.hypr.looknfeel") -require("default.hypr.input") -require("default.hypr.windows") - --- Current theme overrides. -do - local theme = io.open(paths.config_home .. "/omarchy/current/theme/hyprland.lua", "r") - if theme then - theme:close() - require("omarchy.current.theme.hyprland") - end -end +-- All Omarchy default setups +require("default.hypr.omarchy") -- Change your own setup in these files and override defaults. require("hypr.monitors") diff --git a/default/hypr/omarchy.lua b/default/hypr/omarchy.lua new file mode 100644 index 00000000..f5087b8d --- /dev/null +++ b/default/hypr/omarchy.lua @@ -0,0 +1,24 @@ +-- Omarchy Hyprland setup: helpers, defaults, and current theme overrides. + +require("default.hypr.helpers") + +-- Use Omarchy defaults, but don't edit these directly. +require("default.hypr.autostart") +require("default.hypr.bindings.media") +require("default.hypr.bindings.clipboard") +require("default.hypr.bindings.tiling-v2") +require("default.hypr.bindings.utilities") +require("default.hypr.envs") +require("default.hypr.looknfeel") +require("default.hypr.input") +require("default.hypr.windows") + +-- Current theme overrides. +do + local paths = require("default.hypr.paths") + local theme = io.open(paths.config_home .. "/omarchy/current/theme/hyprland.lua", "r") + if theme then + theme:close() + require("omarchy.current.theme.hyprland") + end +end