Add letter-prefix tile labels mode#16
Closed
peterp wants to merge 3 commits intofresh-showfrom
Closed
Conversation
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.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Tile labels setting that lets the user pick between the existing
1-9numeric picks and a new letters mode where every tile is labelled with a 2-char prefix derived from its app name (gcGoogle Chrome,waWhatsApp,cuCursor,ccClaude Code). Type the prefix to pick + activate the window.Behavior
WhatsApp→[Whats, App],VSCodium→[VS, Codium]). 2+ tokens → first letter of first two; 1 token → first two letters.j k l f d s a g h) — second Chrome window getsgj, thirdgk, etc.cavscam).gcChrome window does not reshuffle the second window'sgjprefix.Input
delete(backspace) pops the last char.escclears the buffer; pressing it again with an empty buffer dismisses.wasdmovement,1-9picks, and⌃+letterapp-jump are suppressed in letters mode. Arrows still move;⌘+arrowstill swaps; search and tag bindings are unaffected.Files
LabelAssigner.swift(new) — tokenizer + sticky assignment.Tile.swift—setLabel(_:matchPrefix:)replacessetNumber; chip widens for multi-char strings; matched portion rendered viaNSAttributedStringon the existingCATextLayer.Config.swift,SettingsWindow.swift— newtilePicksenum + segmented picker in Settings.Overlay.swift,OverlayView.swift— typeahead buffer, mode-aware label render, keymap bypass for letters/digits/backspace when letters mode is active.Test plan
gc, second isgj. Close the first; the second staysgj.ca→ one getsca, the othercam.wasd,1-9, and⌃+letterare no-ops; arrows still move;⌘+arrowstill swaps.1-9;wasd, digit picks, and⌃+letterwork again.