Skip to content

Display Apple symbols in keybinding menus - #307

Open
mantisdotdev wants to merge 2 commits into
omacom:quattrofrom
mantisdotdev:feat/apple-keybinding-labels
Open

mantisdotdev wants to merge 2 commits into
omacom:quattrofrom
mantisdotdev:feat/apple-keybinding-labels

Conversation

@mantisdotdev

@mantisdotdev mantisdotdev commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Display , , , and in the main, Tmux, and Herdr keybinding menus.
  • Keep the underlying bindings, cached records, and dispatch metadata unchanged.
  • Preserve alignment for Unicode and long shortcut labels.

Verification

  • Focused keybinding-menu tests pass.
  • Command metadata, Bash syntax, and git diff --check pass.
  • Verified all three menus in the running UI.
screenshot-2026-09-01_03-13-40

@mantisdotdev
mantisdotdev force-pushed the feat/apple-keybinding-labels branch from 714f91a to 43d3dd1 Compare August 31, 2026 21:55

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this — the alignment work is careful, and the tests are real: they render through stubbed hyprctl/tmux/herdr and the new record test actually drives format_display_records. All three test files pass on this branch and omarchy commands --check is clean.

One blocker, then two nits.

bug: the glyph substitution is unconditional in all three menus. This tree is heading toward serving x86 upstream hardware too (#331 adds omarchy-hw-aarch64 and omarchy-hw-apple-silicon), and on a PC keyboard SUPER shown as ⌘ is just wrong. Please gate the substitution on omarchy-hw-apple-silicon (or an equivalent keyboard check) so non-Apple machines keep the plain names. Inline comments mark the three spots.

nit: padded() is copied into the tmux and herdr scripts, with a third inline copy in format_display_records. One shared shape would be easier to keep in step.

nit: the rewritten assertions in keybindings-menu-test.sh and menu-keybindings-fkeys-test.sh will conflict on every upstream merge of those files. If the glyphs are gated, the existing assertions can stay as they are and a Mac-only test can cover the symbols.

count = split(display, parts, /[[:space:]]+/)
display = ""
for (i = 1; i <= count; i++) {
if (parts[i] == "SUPER") parts[i] = "⌘"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug: this runs for everyone. Please wrap the symbol mapping so it only applies when omarchy-hw-apple-silicon (from #331) succeeds; otherwise upstream x86 users see ⌘ for their Windows key.

if (is_modifier && part == "C") return "CTRL"
if (is_modifier && part == "M") return "ALT"
if (is_modifier && part == "S") return "SHIFT"
if (is_modifier && part == "C") return ""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same gate needed here: the tmux menu should only switch to ⌃/⌥/⇧ on Apple hardware.


for (i = 1; i <= count; i++) {
text = text (text == "" ? "" : " + ") toupper(parts[i])
part = toupper(parts[i])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: part is not in the parameter list, so awk makes it a global. The rest of this file declares locals as trailing parameters (key_text(key, count, parts, i, text)), so part belongs there too.

@malik-na

malik-na commented Sep 9, 2026

Copy link
Copy Markdown
Member

The existing blocker remains: modifier glyph substitution is unconditional. Gate Apple symbols on Apple Silicon and keep the current plain labels and assertions for x86.

@malik-na

Copy link
Copy Markdown
Member

Apple modifier symbols render correctly in the main, Tmux, and Herdr keybinding menus. Arrow columns remain aligned, long labels stay intact, and no clipping or overlap is visible.

Good to merge.

@wesleygrimes wesleygrimes added the cherry-pick-later Port to omacom/omarchy after the overlay merges; match mainline. label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-later Port to omacom/omarchy after the overlay merges; match mainline.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants