From 92b3c1a1e3363385c7e80e8ee66c1ab9b4a3337c Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 7 Jul 2026 22:07:21 +0100 Subject: [PATCH] feat(keybinds): move window focus to SUPER+arrows Swap the vim-style SUPER+H/J/K/L focus binds for SUPER+arrow keys (movefocus l/r/u/d). SUPER+arrows were unbound and there are no vim move-window binds, so no collision. prettyKeys renders the arrow keysyms as glyphs so the SUPER+? cheatsheet shows "SUPER + <-" not "SUPER + left". Co-Authored-By: Claude Opus 4.8 --- agent/HARDWARE-QUEUE.md | 3 +++ agent/JOURNAL.md | 12 ++++++++++++ modules/home/keybinds.nix | 10 +++++----- modules/home/rofi.nix | 4 +++- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/agent/HARDWARE-QUEUE.md b/agent/HARDWARE-QUEUE.md index b7a9f2e..89cb3e0 100644 --- a/agent/HARDWARE-QUEUE.md +++ b/agent/HARDWARE-QUEUE.md @@ -236,6 +236,9 @@ QA machine), the **T14s** (webcam case). unchanged (the bar still reserves its space). Accepted trade-off of `layer: bottom`: a floating window dragged over the top strip can now overlap the bar — confirm that's the only regression. +- [ ] **Window focus on arrows** (iteration #61) — after `home-update` + + relogin: SUPER+←/→/↑/↓ move focus between tiled windows; SUPER+H/J/K/L + no longer move focus; SUPER+? cheatsheet shows the arrow glyphs. - [ ] **Audio opens in Amberol** (iteration #60, item 37) — after `home-update`: double-click an mp3/flac/ogg (or `xdg-open song.mp3`) → it opens in Amberol, not mpv; video files still open in mpv. diff --git a/agent/JOURNAL.md b/agent/JOURNAL.md index 4794790..8d5596d 100644 --- a/agent/JOURNAL.md +++ b/agent/JOURNAL.md @@ -17,6 +17,18 @@ Template: --- +## 2026-07-07 — Window focus: vim keys → arrows (iteration #61, direct request) +- **Task:** Bernardo — switch window navigation from vim-style + SUPER+H/J/K/L to SUPER+arrow keys. +- **Fix:** `modules/home/keybinds.nix` focus binds now use + `left/right/up/down` (movefocus l/r/u/d); H/J/K/L freed. No conflict — + SUPER+arrows were unbound and there were no vim *move-window* binds. + Also taught `prettyKeys` (rofi.nix) to render the arrow keysyms as + glyphs (← → ↑ ↓), so the SUPER+? cheatsheet reads "SUPER + ←" not + "SUPER + left" (Return etc. unaffected — no false substring match). +- **Verified:** V0 green; `nix eval` confirms the binds render as + `$mod, left, movefocus, l` … and the glyph mapping is correct. + ## 2026-07-07 — Audio mime → Amberol (iteration #60, item 37) - **Task:** BACKLOG item 37 — default video + audio players + mime. On inspection both players were already installed: mpv (video) and amberol diff --git a/modules/home/keybinds.nix b/modules/home/keybinds.nix index 5563001..da1b28f 100644 --- a/modules/home/keybinds.nix +++ b/modules/home/keybinds.nix @@ -53,11 +53,11 @@ { mods = "$mod CTRL"; key = "A"; action = "exec, nomarchy-menu ask"; desc = "Ask Claude"; } { mods = "$mod CTRL"; key = "D"; action = "exec, nomarchy-menu dnd"; desc = "Do Not Disturb toggle"; } - # Focus - { mods = "$mod"; key = "H"; action = "movefocus, l"; desc = "Focus left"; } - { mods = "$mod"; key = "L"; action = "movefocus, r"; desc = "Focus right"; } - { mods = "$mod"; key = "K"; action = "movefocus, u"; desc = "Focus up"; } - { mods = "$mod"; key = "J"; action = "movefocus, d"; desc = "Focus down"; } + # Focus — SUPER + arrow keys. + { mods = "$mod"; key = "left"; action = "movefocus, l"; desc = "Focus left"; } + { mods = "$mod"; key = "right"; action = "movefocus, r"; desc = "Focus right"; } + { mods = "$mod"; key = "up"; action = "movefocus, u"; desc = "Focus up"; } + { mods = "$mod"; key = "down"; action = "movefocus, d"; desc = "Focus down"; } # Screenshots (the menu's Capture module has the rest: OCR, recording). # Bare Print → region to clipboard; the two → file binds save a diff --git a/modules/home/rofi.nix b/modules/home/rofi.nix index 152290e..bc77763 100644 --- a/modules/home/rofi.nix +++ b/modules/home/rofi.nix @@ -126,7 +126,9 @@ let prettyKeys = b: let m = lib.replaceStrings [ "$mod" ] [ "SUPER" ] b.mods; prefix = if m == "" then "" else lib.concatStringsSep " + " (lib.splitString " " m) + " + "; - key = lib.replaceStrings [ "question" "slash" ] [ "?" "/" ] b.key; + key = lib.replaceStrings + [ "question" "slash" "left" "right" "up" "down" ] + [ "?" "/" "←" "→" "↑" "↓" ] b.key; # ? already implies Shift — the bind needs SHIFT in its modmask # (keybinds.nix), but showing it would read double, so collapse # "SHIFT + ?" back to the documented "?".