Skip to content

Add i3OrderedWithAppIcons menu bar style#1952

Closed
kim-raaschou wants to merge 1 commit intonikitabobko:mainfrom
kim-raaschou:feature/menu-bar-app-icons-pr
Closed

Add i3OrderedWithAppIcons menu bar style#1952
kim-raaschou wants to merge 1 commit intonikitabobko:mainfrom
kim-raaschou:feature/menu-bar-app-icons-pr

Conversation

@kim-raaschou
Copy link
Copy Markdown

Summary

  • Adds a new i3OrderedWithAppIcons menu bar style that displays app icons inline after each workspace number, making it easy to see at a glance which apps are on which workspace without switching to check
  • The focused window's icon gets a subtle 1pt border so you can tell which window is active directly from the menu bar
  • Available in the Experimental UI Settings dropdown alongside existing styles

Workflow / Use Case

With many workspaces, users constantly switch workspaces just to check what's running where. This style eliminates that friction — a quick glance at the menu bar shows exactly which apps are on each workspace and which window has focus. Particularly useful for multi-monitor setups where context-switching between workspaces is frequent.

Implementation

  • 3 files changed, +99/-16 lines, no new files, no new dependencies
  • ExperimentalUISettings.swift — new enum case (+2 lines)
  • TrayMenuModel.swiftAppViewModel struct, resolveAppIcon() with 4-strategy cascading fallback, gated construction so other styles pay zero cost (+50 lines, zero existing lines modified)
  • MenuBarLabel.swift — extracted shared orderedWorkspacesView(showApps:) helper that serves both i3Ordered and i3OrderedWithAppIcons, reducing duplication (+63/-16 lines)

Design decisions

  • Gated: resolveAppIcon() only runs when this style is active — all other styles have zero overhead
  • Shared helper: the existing i3Ordered inline code was refactored into a reusable method, so both styles benefit from cleaner structure
  • Icon resolution: 4-strategy cascading fallback — NSRunningApplication.iconNSWorkspace.icon(forFile: bundlePath) → resolve bundleId → URL → icon → generic NSImage.applicationIconName
  • No config knobs: follows the Experimental UI Settings pattern via UserDefaults — no TOML changes
  • Window ordering: uses existing allLeafWindowsRecursive (DFS order)

All 106 existing tests pass.

@kim-raaschou kim-raaschou force-pushed the feature/menu-bar-app-icons-pr branch 3 times, most recently from de6126c to c15fd71 Compare February 16, 2026 08:15
@kim-raaschou kim-raaschou force-pushed the feature/menu-bar-app-icons-pr branch from c15fd71 to 6d93f7a Compare February 16, 2026 08:17
@nikitabobko
Copy link
Copy Markdown
Owner

I didn't look at the code, I only tested it, but here are my concerns:

  1. Sometimes, the change of style in the menu, doesn't show up immediately in the bar. I have to click the bar or change the focus for the setting to take effect
  2. When there are multiple windows of the same app on one workspace, the implementation unnecessarily shows multiple icons of the same app
  3. The bar is now really horizontally huuuuge which makes it even harder to use it together with a Macbook notch
  4. The bar is different in the menu bar and the menu dropdown for some reason (probably, because of 3)
  5. Why only 'i3 style ordered' has to have the app icons options? What about other styles that we offer?
  6. Now, the menu is harder to scan visually, cause horizontal width of every item is not uniform anymore (some workspaces contain more windows than others)
  7. You don't follow the PR checklist/template. It makes me frustrated and it already gives me the right to silently reject this PR as stated in the checklist
  8. I sense AI abuse in this PR

What you are submitting right now is not production ready
image

@kim-raaschou
Copy link
Copy Markdown
Author

kim-raaschou commented Feb 19, 2026

That was quick! Could you please give me a couple more days? I will provide comments on your questions and concerns. 🙏

For now, I can provide a link to the discussion: #1961

@nikitabobko
Copy link
Copy Markdown
Owner

nikitabobko commented Feb 19, 2026

If the comments are verbal, feel free to provide them here in the closed PR (the PR is still open for comments)

If you change your code and you want to resubmit it, please open a new PR that follows the PR template and the checklist

@kim-raaschou
Copy link
Copy Markdown
Author

kim-raaschou commented Feb 19, 2026

Super. 😃 I will answer you questions
But first thanks for this wonderful application, Aerospace is my daily driver. 🥇

  1. Sometimes, the change of style in the menu, doesn't show up immediately in the bar. I have to click the bar or change the focus for the setting to take effect

The implementation is relying on that aerospace does - it contains no logic only presentation of current state.
I think Sketchybar and others will have more issues, actually the implementation is sorted by internal DFS, and it is my impression that the app order is better that any external menubar implementation. 👍

  1. When there are multiple windows of the same app on one workspace, the implementation unnecessarily shows multiple icons of the same app

This is a matter of preference - i think. I actually like the app to be show multiple times. but to keep the pr as minimal, i have not implemented any logic to handle that. It could be a config setting (show all/one app) - but for now no configs for experimantal UI...
I DONT like IntelliJ IDEA showing more app-icons for just refactoring a file or similar... 😒
Also how to show if multiple windows in different workspaces - it could be a marker, but again ? (KISS).

  1. The bar is now really horizontally huuuuge which makes it even harder to use it together with a Macbook notch

This setting is not for users having 20+ apps open at the once, then any bar will clutter.. I prefer having 10- apps open once - depending on other bar items. When using it makes me sanitize apps and workspaces - witch i really like. I rarely have more than 10 apps open at once, and think having more would be a mess... 🫤

  1. The bar is different in the menu bar and the menu dropdown for some reason (probably, because of 3)

This is expected. I dont want the extension to mess up the bar. So i only present 1 app. Maybe it could improved ?

  1. Why only 'i3 style ordered' has to have the app icons options? What about other styles that we offer?

I want to keep the PR minimal - i could be done but i like to KISS for how

  1. Now, the menu is harder to scan visually, cause horizontal width of every item is not uniform anymore (some workspaces contain more windows than others) same as 3. but i like to extend with this:
    I only have 5 workspaces, this feature is not for users with 28 workspaces, it would be a mess.

  2. You don't follow the PR checklist/template. It makes me frustrated and it already gives me the right to silently reject this PR as stated in the checklist

Sorry. I think i have found it - maybe i deleted it when i created the PR 😿

8: I sense AI abuse in this PR

Aaaahh i know. this is only for minimizing writing effort - english is not my native language and not my main expertise. I am working on it and hope you will forgive me - but again this is also a opportunity to improve. Also Swift is not my preferred language..

  1. What you are submitting right now is not production ready:
    What do you think could me i ready for prod ? I know you have strong opinions og the menu bar. 😄
    BUT I have use this feature for some time (10+ days) and for me it actually better than most/(i think all) sketchybar implementations. 💯 😀

I am hoping you will continue review this PR - i am open for questions and improvements.
I actually have more stuff i am missing in aerospace - but for now i just want to contribute.
Looking forward to you response.

Regards Kim.

@kim-raaschou
Copy link
Copy Markdown
Author

kim-raaschou commented Feb 23, 2026

This is what my crowded Aerospace menu looks like. I actually find it better than I expected.
Please share your thought. I really think this PR is a great addition. It has been my daily driver for some time now.
Aerospace handles it very nicely.
PS: This is with the macOS notch.

Skærmbillede 2026-02-23 kl  19 01 49

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.

2 participants