hypr: make the per-host config lookup case-insensitive

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.
This commit is contained in:
Jeena 2026-09-18 05:45:44 +09:00
parent f522222836
commit 06de4dcb8a
4 changed files with 2 additions and 2 deletions

View file

@ -277,7 +277,7 @@ require("windowrule")
-- Host overrides (detect machine by hostname and load matching hosts/<host>.lua) -- Host overrides (detect machine by hostname and load matching hosts/<host>.lua)
local hostname = (io.popen("hostname") or {}):read("*l") or "" 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) local ok, err = pcall(require, "hosts." .. hostname)
if not ok then if not ok then
-- No host file matches this machine; use the defaults already set above. -- No host file matches this machine; use the defaults already set above.

View file

@ -2,7 +2,7 @@
│ SUPER + T Open terminal │ │ SUPER + W Close focused window │ │ SUPER + T Open terminal │ │ SUPER + W Close focused window │
│ SUPER + B Open browser │ │ SUPER + M Exit Hyprland │ │ SUPER + B Open browser │ │ SUPER + M Exit Hyprland │
│ SUPER + E Open file manager │ │ SUPER + V Toggle floating │ │ 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) │ └────────────────────────────────────────────────────┘ │ SUPER + P Pseudo split (dwindle) │
┌───────────────── Focus Movement ───────────────────┐ │ SUPER + J Toggle split (dwindle) │ ┌───────────────── Focus Movement ───────────────────┐ │ SUPER + J Toggle split (dwindle) │
│ SUPER + ←/→/↑/↓ Move focus │ │ SUPER + F Toggle fullscreen │ │ SUPER + ←/→/↑/↓ Move focus │ │ SUPER + F Toggle fullscreen │