30 lines
682 B
Lua
30 lines
682 B
Lua
-- Main Hyprland configuration loader
|
|
|
|
local config_dir = os.getenv("HOME") .. "/.config/hypr"
|
|
|
|
-- Detect hostname
|
|
local handle = io.popen("hostname")
|
|
local hostname = handle:read("*l")
|
|
handle:close()
|
|
|
|
-- Make shared modules discoverable
|
|
package.path = config_dir .. "/?.lua;" .. package.path
|
|
|
|
-- Map hostnames to configurations
|
|
local hosts = {
|
|
["work-laptop"] = "work",
|
|
["sprinter"] = "sprinter",
|
|
["bubby"] = "bubby",
|
|
}
|
|
|
|
local selected = hosts[hostname]
|
|
|
|
if not selected then
|
|
error("No Hyprland configuration found for hostname: " .. hostname)
|
|
end
|
|
|
|
print("Loading Hyprland configuration: " .. selected)
|
|
|
|
dofile(config_dir .. "/hosts/" .. selected .. ".lua")
|
|
|