hyprland.lua Entrypoint
Path: ~/.config/hypr/hyprland.lua
hyprland.lua is the only supported compositor entrypoint for Hyprland 0.55 and newer in HyprFlux. Its job is orchestration: it loads modules in dependency order and registers the initial-boot callback.
Entrypoint shape
local Home = os.getenv("HOME")
require("UserConfigs.user-defaults")
require("hyprflux-colors")
require("UserConfigs.env-variables")
require("UserConfigs.user-settings")
require("UserConfigs.user-decorations")
require("UserConfigs.user-animations")The source assigns the first two returned tables to locals, but other modules import those dependencies themselves where needed. Required modules share the global hl API. Ordinary Lua locals stay module-scoped.
Why the environment module loads first
env-variables.lua must make the first real hl.* calls. Keep it before settings, decorations, bindings, rules, events, monitors, and workspaces. Defaults and colors can load before it because they only return Lua tables.
Bindings and rules
The entrypoint then loads the bindings in this order:
require("configs.keybinds")
require("UserConfigs.user-keybinds")
require("UserConfigs.laptops")That order controls registration order, not replacement. If two modules register the same key combination, both may run. Use hyprctl binds and the keybinding table when you check a new combination.
The window and workspace rule modules follow:
require("UserConfigs.window-rules")
require("UserConfigs.workspace-rules")workspace-rules.lua currently contains commented examples only. Its header says it is not loaded, but the entrypoint does load it. Runtime behavior wins over that stale comment.
Startup and generated state
The entrypoint registers initial-boot.sh, then loads the session startup module and the generated display state:
hl.on("hyprland.start", function()
hl.exec_cmd(Home .. "/.config/hypr/initial-boot.sh")
end)
require("UserConfigs.startup-apps")
require("monitors")
require("workspaces")
require("UserConfigs.LaptopDisplay")Do not rely on readiness between independently registered startup callbacks. Put dependent shell steps in one script, or use a systemd user service.
Module names
Dots in a module name represent nested paths. For example:
require("UserConfigs.user-settings")loads UserConfigs/user-settings.lua relative to the Hyprland configuration root. A failed required module is a configuration error. There is no fallback to an old .conf file.
Complete load order
The entrypoint requires these modules in exactly this order:
UserConfigs.user-defaultshyprflux-colorsUserConfigs.env-variablesUserConfigs.user-settingsUserConfigs.user-decorationsUserConfigs.user-animationsconfigs.keybindsUserConfigs.user-keybindsUserConfigs.laptopsUserConfigs.window-rulesUserConfigs.workspace-rules- Register the
initial-boot.shstartup callback UserConfigs.startup-appsmonitorsworkspacesUserConfigs.LaptopDisplay
This list summarizes the sections above. The sections explain each step in more detail.
Validation
Validate individual Lua files while you edit them:
luac -p ~/.config/hypr/hyprland.lua
luac -p ~/.config/hypr/UserConfigs/user-settings.luaThen validate the full graph:
Hyprland --config ~/.config/hypr/hyprland.lua --verify-configInside a running session:
hyprctl reload
hyprctl configerrorsPartial snippets on these pages depend on the hl global and are not standalone programs. Always validate the complete installed configuration.