better env management
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
|
||||
local env = require("env")
|
||||
local config_home = os.getenv("XDG_CONFIG_HOME") or os.getenv("HOME") .. "/.config"
|
||||
|
||||
local fid_env = io.open(config_home .. "/hypr/env")
|
||||
local env = {}
|
||||
if fid_env then
|
||||
env = require("env")
|
||||
else
|
||||
env = require("env_example")
|
||||
end
|
||||
|
||||
if env.shell ~= "noctalia" and env.shell ~= "caelestia" then
|
||||
error("Unsupported shell '" .. tostring(env.shell) .. "' in ~/.config/hypr/env.lua; choose 'noctalia' or 'caelestia'")
|
||||
end
|
||||
@@ -13,14 +22,6 @@ hl.exec_cmd("bash ~/.config/hypr/env.sh")
|
||||
-- load default monitor config
|
||||
require("modules.monitor_setup_default")
|
||||
|
||||
-- Only use monitor_setup if the file exists
|
||||
local config_home = os.getenv("XDG_CONFIG_HOME") or os.getenv("HOME") .. "/.config"
|
||||
local f = io.open(config_home .. "/hypr/monitor_setup.lua", "r")
|
||||
if f then
|
||||
f:close()
|
||||
require("monitor_setup")
|
||||
end
|
||||
|
||||
-- unscale XWayland
|
||||
hl.config({
|
||||
xwayland = {
|
||||
@@ -50,7 +51,11 @@ require("modules.keybinds")
|
||||
require("modules.windows_and_workspaces")
|
||||
|
||||
-- HyprMod managed settings
|
||||
require("hyprland-gui")
|
||||
local fid_gui = io.open(config_home .. "/hypr/hyprland-buntes-monster-gui")
|
||||
if fid_gui then
|
||||
fid_gui:close()
|
||||
require("hyprland-buntes-monster-gui")
|
||||
end
|
||||
|
||||
-- For Noctalia Color templates
|
||||
require("noctalia").apply_theme()
|
||||
|
||||
Reference in New Issue
Block a user