From 06de4dcb8acfd4d55d9e0ea9513fe883b6a1c7fe Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 18 Sep 2026 05:45:44 +0900 Subject: [PATCH] hypr: make the per-host config lookup case-insensitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hosts files were written capitalized (Rutherford.lua, Chester.lua) but the require uses the hostname exactly as `hostname` prints it — lowercase — so on a case-sensitive filesystem the lookup missed and pcall silently swallowed it. The per-host monitor overrides therefore never loaded on either machine. Normalize the hostname to lowercase and name the files in lowercase so any casing matches. --- hypr/hosts/{Chester.lua => chester.lua} | 0 hypr/hosts/{Rutherford.lua => rutherford.lua} | 0 hypr/hyprland.lua | 2 +- hypr/shortcuts.txt | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename hypr/hosts/{Chester.lua => chester.lua} (100%) rename hypr/hosts/{Rutherford.lua => rutherford.lua} (100%) diff --git a/hypr/hosts/Chester.lua b/hypr/hosts/chester.lua similarity index 100% rename from hypr/hosts/Chester.lua rename to hypr/hosts/chester.lua diff --git a/hypr/hosts/Rutherford.lua b/hypr/hosts/rutherford.lua similarity index 100% rename from hypr/hosts/Rutherford.lua rename to hypr/hosts/rutherford.lua diff --git a/hypr/hyprland.lua b/hypr/hyprland.lua index 7545e98..d3bed9e 100644 --- a/hypr/hyprland.lua +++ b/hypr/hyprland.lua @@ -277,7 +277,7 @@ require("windowrule") -- Host overrides (detect machine by hostname and load matching hosts/.lua) local hostname = (io.popen("hostname") or {}):read("*l") or "" -hostname = hostname:gsub("%..*$", "") -- strip domain suffix +hostname = hostname:gsub("%..*$", ""):lower() -- strip domain suffix, normalize case local ok, err = pcall(require, "hosts." .. hostname) if not ok then -- No host file matches this machine; use the defaults already set above. diff --git a/hypr/shortcuts.txt b/hypr/shortcuts.txt index 63a5e18..8ba8fcb 100644 --- a/hypr/shortcuts.txt +++ b/hypr/shortcuts.txt @@ -2,7 +2,7 @@ │ SUPER + T Open terminal │ │ SUPER + W Close focused window │ │ SUPER + B Open browser │ │ SUPER + M Exit Hyprland │ │ SUPER + E Open file manager │ │ SUPER + V Toggle floating │ -│ SUPER+SHIFT+F23 / Pause Voice dictation │ +│ SUPER+SHIFT+F23 / AltGr / Pause Voice dictation │ └────────────────────────────────────────────────────┘ │ SUPER + P Pseudo split (dwindle) │ ┌───────────────── Focus Movement ───────────────────┐ │ SUPER + J Toggle split (dwindle) │ │ SUPER + ←/→/↑/↓ Move focus │ │ SUPER + F Toggle fullscreen │