Skip to content

Use SF Symbol for the menu bar icon (fixes #27) - #54

Open
timokox wants to merge 1 commit into
bhaller:masterfrom
timokox:feat-sf-symbol-menubar-icon-upstream
Open

Use SF Symbol for the menu bar icon (fixes #27)#54
timokox wants to merge 1 commit into
bhaller:masterfrom
timokox:feat-sf-symbol-menubar-icon-upstream

Conversation

@timokox

@timokox timokox commented May 23, 2026

Copy link
Copy Markdown

Addresses #27 — "the current menu bar icon is photo-realistic and thus not very Mac-like".

Change

On macOS 11+, switch the status-bar icon from the photo-realistic application icon (NSImageNameApplicationIcon) to the SF Symbol cursorarrow.motionlines — a cursor with motion lines, which is a much better metaphor for what Jiggler does and matches the visual style of the rest of the modern menu bar.

Before After
Photo-realistic app icon, manually scaled to bar thickness, three pre-tinted variants (neutral / green-tint when jiggling / red-tint during Timed Quit) SF Symbol cursorarrow.motionlines as a template image, state via NSStatusBarButton.contentTintColor

Backwards-compat / opt-back

  • On macOS 10.15 (the deployment target), the SF Symbol API isn't available, so the existing classic-icon path is used unchanged.

  • Any user who prefers the original icon can opt back with:

    defaults write com.stick.app.jiggler UseClassicMenuBarIcon -bool YES
  • No new visible UI. Matches the README's "please try to keep the user interface simple and comprehensible" guidance.

Code shape

The three scaledJiggler*Image ivars are only allocated when the classic path is going to be used, so the SF-Symbol path skips creating them entirely. -fixStatusItemIcon picks the mode by checking scaledJigglerImage != nil. Template-image mode means the menu bar handles light/dark automatically.

Verification

xcodebuild -configuration Debug build → BUILD SUCCEEDED, no warnings. Both modes (default + UseClassicMenuBarIcon = YES) smoke-tested alive.

Why this and not a Preferences toggle?

A real opt-in pref would need a checkbox added to Preferences.xib, which is a bigger change with cross-version XIB risk. The defaults-only knob keeps this PR strictly to the cursor-style change. If you'd prefer a checkbox, I'm happy to add one.

Issue bhaller#27: the photo-realistic application icon used as the status-
bar image is not very Mac-like in modern menu bars where everything
else is a thin template glyph.

On macOS 11+ switch to the SF Symbol "cursorarrow.motionlines" — a
cursor with motion lines, which fits Jiggler's metaphor much better
than the literal product icon.  The image is set as a template so
the system handles light/dark menu bar appearance.  State changes
(active jiggling green, timed-quit countdown red) move from
pre-tinted image variants to NSStatusBarButton.contentTintColor,
which is cleaner and adapts to system accent colours.

On macOS 10.15, and for any user who explicitly opts back to the
original icon, keep the classic three-image setup unchanged.  Opt
in to the classic icon with:

    defaults write com.stick.app.jiggler UseClassicMenuBarIcon -bool YES

The three classic-icon ivars (scaledJigglerImage, …Red, …Green) are
only allocated when we are actually going to use them, so SF-Symbol
mode skips creating them entirely.  -fixStatusItemIcon picks the
mode by checking whether scaledJigglerImage exists.

Build clean.
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