From cb96dd6159ffdfb836119ae0d5d085297eca259b Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Tue, 7 Jul 2026 23:26:21 +0200 Subject: [PATCH] Fix machine-generated Hyprland config never loading Lua's require() treats dots in the module string as directory separators, so pcall(require, "conf.d.autostart") resolved to conf/d/autostart.lua instead of the real conf.d/autostart.lua. The failure was silently swallowed by pcall, so autostart/locale/nvidia/ terminal configs never took effect on any machine using this repo. Renamed the generated directory to confd (no dot) and updated the require calls to match. --- packages/hyprland/.config/hypr/hyprland.lua | 8 ++++---- src/stow.ts | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/hyprland/.config/hypr/hyprland.lua b/packages/hyprland/.config/hypr/hyprland.lua index a3fd34c..90cd0bb 100644 --- a/packages/hyprland/.config/hypr/hyprland.lua +++ b/packages/hyprland/.config/hypr/hyprland.lua @@ -11,7 +11,7 @@ hl.config({ }) -- machine-generated by src/install.ts based on chosen packages/detected hardware/locale -pcall(require, "conf.d.autostart") -pcall(require, "conf.d.locale") -pcall(require, "conf.d.nvidia") -pcall(require, "conf.d.terminal") +pcall(require, "confd.autostart") +pcall(require, "confd.locale") +pcall(require, "confd.nvidia") +pcall(require, "confd.terminal") diff --git a/src/stow.ts b/src/stow.ts index d542213..a1e198d 100644 --- a/src/stow.ts +++ b/src/stow.ts @@ -127,11 +127,13 @@ export function ensureSddmEnabled() { } } -// Machine-generated Hyprland config lives under ~/.config/hypr/conf.d, sourced from the -// stowed hyprland.lua via pcall(require, "conf.d.") — never stowed itself, since it -// varies per machine/per install run (chosen packages, detected hardware/locale). +// Machine-generated Hyprland config lives under ~/.config/hypr/confd, sourced from the +// stowed hyprland.lua via pcall(require, "confd.") — never stowed itself, since it +// varies per machine/per install run (chosen packages, detected hardware/locale). Named +// "confd" (no dot) rather than "conf.d" because Lua's require() treats dots in the module +// string as directory separators, so "conf.d." would resolve to conf/d/.lua. function hyprConfD(): string { - return join(homedir(), ".config", "hypr", "conf.d"); + return join(homedir(), ".config", "hypr", "confd"); } // Only written when install detects an NVIDIA GPU.