Skip to content

Add letter-prefix tile labels (default)#17

Merged
peterp merged 3 commits intomainfrom
letter-picks
May 6, 2026
Merged

Add letter-prefix tile labels (default)#17
peterp merged 3 commits intomainfrom
letter-picks

Conversation

@peterp
Copy link
Copy Markdown
Owner

@peterp peterp commented May 6, 2026

Re-opening #16 (auto-closed when its base `fresh-show` was deleted on #15 merge).

Summary

Adds a new Tile labels setting that lets the user pick between the existing 1-9 numeric picks and a new letters mode where every tile is labelled with a 2-char prefix derived from its app name (`gc` Google Chrome, `wa` WhatsApp, `cu` Cursor, `cc` Claude Code). Letters mode is the default for new and existing installs; numbers mode remains available via Settings or `"tilePicks": "numbers"`.

Behavior

  • Prefix algorithm: tokenize the app name on whitespace and camelCase boundaries (`WhatsApp` → `[Whats, App]`, `VSCodium` → `[VS, Codium]`). 2+ tokens → first letter of first two; 1 token → first two letters.
  • Same-app duplicates: keep the first letter, pick the second from a home-row pool (`j k l f d s a g h`) — second Chrome window gets `gj`.
  • Cross-app collisions: extend to 3 chars from the app name (Calendar vs Camera → `ca` vs `cam`).
  • Sticky assignments: prefixes persist for the lifetime of the process. Closing the original `gc` Chrome window does not reshuffle the second window's `gj`.

Input

  • A typeahead buffer matches the prefix as you type. The matched portion of each tile's chip renders in yellow; non-matching tiles dim to 30%. A unique full match auto-picks.
  • `delete` (backspace) pops the last char.
  • `esc` clears the buffer; pressing it again with an empty buffer dismisses.
  • In letters mode, `wasd` movement, `1`-`9` picks, and `⌃+letter` app-jump are suppressed. Arrows still move; `⌘+arrow` still swaps; search and tag bindings are unaffected.

Test plan

  • Fresh install / unset config → tiles show 2-char chips on `⌘⌘`.
  • Type a letter — matching tiles' prefix highlights yellow on the matched chars; non-matching tiles dim. Type the next char to narrow down. Unique match auto-picks + activates.
  • Open two Chrome windows — first is `gc`, second is `gj`. Close the first; the second stays `gj`.
  • Calendar + Camera both want `ca` → one gets `ca`, the other `cam`.
  • Backspace pops a char; esc clears buffer; second esc dismisses.
  • Settings → Tile labels → Numbers (1–9) → `wasd`, digit picks, and `⌃+letter` work again.

peterp added 3 commits May 6, 2026 07:54
New "Tile labels" setting picks between numbers (1-9) and letters
(app initials). In letters mode, every tile gets a sticky 2-char
prefix derived from its app name — "gc" for Google Chrome, "wa" for
WhatsApp, "cu" for Cursor, "cc" for Claude Code — and the user types
the prefix to pick + activate.

Algorithm:
- Tokenize the app name on whitespace and camelCase boundaries.
  "WhatsApp" -> ["Whats", "App"], "VSCodium" -> ["VS", "Codium"].
- 2+ tokens: first letter of first two tokens. 1 token: first two
  letters.
- Same-app dups keep the first letter and pick the second from a
  home-row pool (j k l f d s a g h) — second Chrome window becomes
  "gj".
- Cross-app collisions extend to 3 chars from the app name (Calendar
  vs Camera -> "ca" vs "cam").
- Assignments are sticky for the lifetime of the process: closing or
  opening other windows never reshuffles existing prefixes.

Input:
- A typeahead buffer matches the prefix as you type. The matched
  portion of each tile's chip renders in yellow; tiles whose prefix
  does not match the buffer dim to 30%.
- delete (backspace) pops the last char, esc clears the buffer (and
  dismisses on a second press).
- letters mode suppresses 1-9 picks, ctrl+letter app jump, and the
  wasd movement keys; arrows still move and cmd+arrow still swaps.
Flips the unset-config default from numbers to letters and updates
the README accordingly. Numbers (and wasd / ctrl+letter app jump)
remain available via "tilePicks": "numbers" in the config or the
Settings picker.
@peterp peterp merged commit 92a1778 into main May 6, 2026
1 check passed
@peterp peterp deleted the letter-picks branch May 6, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant