From 6d7596c7901b20b96faff1f707a1c0de2eab31d1 Mon Sep 17 00:00:00 2001 From: TechDufus Date: Mon, 30 Nov 2026 15:03:00 -0600 Subject: [PATCH] fix(omarchy): keep the session on Dvorak Omarchy's default input.lua takes the Hyprland layout from /etc/vconsole.conf, which bootstrap sets to US on a VM for its hypervisor console and disk-unlock prompt. Moonlight sends key positions, so the session then typed QWERTY. keyboard.lua now sets us/dvorak itself. The console and unlock prompt keep following vconsole.conf. --- docs/fork.md | 2 +- modules/omarchy/hypr/keyboard.lua | 6 +++++- modules/system/bootstrap.sh | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/fork.md b/docs/fork.md index 4bc38f49..3c58b176 100644 --- a/docs/fork.md +++ b/docs/fork.md @@ -47,7 +47,7 @@ The other 1Password references: | Setting | Where | What it does | | --- | --- | --- | -| Keyboard and locale (Linux) | `modules/system/bootstrap.sh` | Sets the console keymap to `dvorak`, the X11 layout to `us` / `dvorak` with `caps:none`, and the locale to `en_US.UTF-8`. In a virtual machine both are plain `us`, because a hypervisor console sends US key positions | +| Keyboard and locale (Linux) | `modules/system/bootstrap.sh`, `modules/omarchy/hypr/keyboard.lua` | Sets the console keymap to `dvorak`, the X11 layout to `us` / `dvorak` with `caps:none`, and the locale to `en_US.UTF-8`. In a virtual machine both are plain `us`, because a hypervisor console sends US key positions. `keyboard.lua` sets the Hyprland session to `us` / `dvorak` on every machine | | Passwordless sudo (Linux) | `modules/system/bootstrap.sh` | Installs `/etc/sudoers.d/techdufus`, granting the account that runs bootstrap `NOPASSWD: ALL` | | Login shell | `[bootstrap.user]` in `modules/zsh/mise.linux.toml` and `mise.macos.toml` | Changes it to zsh | | CapsLock | `modules/omarchy/hypr/keyboard.lua` and `summon.lua`; `modules/hammerspoon/karabiner/karabiner.json` | CapsLock stops being CapsLock and becomes the app leader | diff --git a/modules/omarchy/hypr/keyboard.lua b/modules/omarchy/hypr/keyboard.lua index 4bf2b4de..44c3d823 100644 --- a/modules/omarchy/hypr/keyboard.lua +++ b/modules/omarchy/hypr/keyboard.lua @@ -1,7 +1,11 @@ -- Managed by ~/.dotfiles modules/omarchy (CapsLock is the summon leader; Compose moves to Right Alt). --- Layout/variant come from /etc/vconsole.conf via Omarchy's default input.lua (modules/system localectl). +-- The session is Dvorak on every machine. Omarchy's default input.lua would take the layout from +-- /etc/vconsole.conf, which modules/system sets to US on a virtual machine for its hypervisor +-- console and disk-unlock prompt. Moonlight and real keyboards send key positions, so they need this. hl.config({ input = { + kb_layout = "us", + kb_variant = "dvorak", kb_options = "caps:none,compose:ralt,shift:both_capslock_cancel", }, }) diff --git a/modules/system/bootstrap.sh b/modules/system/bootstrap.sh index 11d76634..ddd1a947 100755 --- a/modules/system/bootstrap.sh +++ b/modules/system/bootstrap.sh @@ -46,8 +46,9 @@ fi field() { printf '%s\n' "$status" | sed -n "s/^[[:space:]]*$1:[[:space:]]*//p" | head -n 1; } # A virtual machine is typed on through its hypervisor console, which sends each -# character as its US QWERTY key (QEMU -k en-us), so the guest must read US QWERTY -# or every key is remapped twice. gliff and SSH carry the client's own layout. +# character as its US QWERTY key (QEMU -k en-us), so the console and the disk-unlock +# prompt must read US QWERTY or every key is remapped twice. The Hyprland session +# sets its own layout (modules/omarchy/hypr/keyboard.lua). keymap=dvorak variant=dvorak if systemd-detect-virt --quiet --vm; then keymap=us variant=