Skip to content

Let the input source widget show the Input menu's icon, such as あ for Hiragana #981

Backlog

Description

@Seeow

Problem

With a Japanese input method, the input source widget shows JA whatever the mode: Hiragana, Katakana, Romaji, full-width Romaji and half-width Katakana all look the same. The mode decides what the next key types, so the bar can't tell you that. The macOS menu bar shows it with an icon (あ, ア, A…), but it's hidden when StableBar replaces it.

Other input methods with modes have the same problem, such as Chinese (Pinyin, Wubi, Zhuyin…), Korean or Tamil.

StableBar 0.20.0, macOS 27.2.

Proposal

A label setting on the inputSource provider:

  • language (default): today's behavior, FR, JA…
  • icon: the icon the Input menu shows for the selected source, from kTISPropertyIconImageURL, tinted like a symbol when it's a gray mask, as Apple's icons are. If the declared file is missing, it tries other extensions, as TextInputSources.h recommends (Korean declares .png files it ships as .tiff). When macOS has no icon file for the source, the widget shows the language, as with language. That's the case for keyboard layouts and for Vietnamese. With an icon, the provider's text is the source's name, so VoiceOver reads "Hiragana" instead of JA.

It's editable under Show in the widget's Content tab. The provider output also gets fields.mode (the input mode ID), fields.image (the icon's path) and fields.label, so custom layouts can use them.

One open question: keyboard layouts and Vietnamese only get their real icon (such as the CH badge for Swiss French) through undocumented TIS properties, kTISPropertyInputSourceIconLabels and kTISPropertyIconImage. I left them out because of the private API rule in AGENTS.md, but they would give every source the Input menu's look. Would you accept them in PrivateAPI.swift?

I have an implementation on a branch of my fork: the setting, the picker in Settings, the schema, the docs, tests and two scenes. I can open the PR if this works for you.

Possible today

Partly, with a custom layout on the widget: a text block per mode with showWhen on fields.id (…RomajiTyping.Japanese shows あ, …Japanese.Katakana shows ア), and the text field hidden for those IDs. It works, but it needs one block per mode and per input method, and it only gives text, not the Input menu's icons.

Related

Triaged by Claude Code via T3 Code (Claude Opus 5.5).

Activity

  1. added
    needs-triage
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions