Trim over-commented Chunk 3+/4 work
A pass over the install scripts, dev-tools commands, and Hyprland Lua files that I had stuffed with explain-everything preambles. Most of those rationales (which files ship where, why hyprctl setenv doesn't suffice, etc.) belong in commit messages or PR descriptions, not in code people have to read forever. Kept the few comments that document genuinely non-obvious behaviour: the keybind-env reason for hl.env in envs.lua, why the runtime PAM seds stay scripted in increase-lockout-limit, the chroot/--now distinction in chroot.sh, and the dev-pkg-test split-install reason.
This commit is contained in:
+3
-11
@@ -24,21 +24,13 @@ hl.env("XDG_SESSION_DESKTOP", "Hyprland")
|
||||
-- Use XCompose file.
|
||||
hl.env("XCOMPOSEFILE", paths.home .. "/.XCompose")
|
||||
|
||||
-- Propagate OMARCHY_PATH and PATH to processes spawned by Hyprland (keybinds,
|
||||
-- dispatchers, autostart). hyprctl setenv doesn't reach the env captured for
|
||||
-- bind exec at config-load time, so omarchy-dev-link reaches this via
|
||||
-- hyprctl reload re-running envs.lua with the new paths.omarchy_path.
|
||||
-- hyprctl setenv doesn't reach keybind dispatcher env; use hl.env.
|
||||
hl.env("OMARCHY_PATH", paths.omarchy_path)
|
||||
|
||||
-- Prepend $OMARCHY_PATH/bin to PATH, deduping any prior occurrence so
|
||||
-- reloads don't accumulate duplicates.
|
||||
local bin_dir = paths.omarchy_path .. "/bin"
|
||||
local current_path = os.getenv("PATH") or "/usr/local/bin:/usr/bin"
|
||||
local kept = {}
|
||||
for entry in current_path:gmatch("[^:]+") do
|
||||
if entry ~= bin_dir then
|
||||
table.insert(kept, entry)
|
||||
end
|
||||
for entry in (os.getenv("PATH") or "/usr/local/bin:/usr/bin"):gmatch("[^:]+") do
|
||||
if entry ~= bin_dir then table.insert(kept, entry) end
|
||||
end
|
||||
table.insert(kept, 1, bin_dir)
|
||||
hl.env("PATH", table.concat(kept, ":"))
|
||||
|
||||
Reference in New Issue
Block a user