Add i3OrderedWithAppIcons menu bar style#1952
Add i3OrderedWithAppIcons menu bar style#1952kim-raaschou wants to merge 1 commit intonikitabobko:mainfrom
Conversation
de6126c to
c15fd71
Compare
c15fd71 to
6d93f7a
Compare
|
I didn't look at the code, I only tested it, but here are my concerns:
|
|
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 |
|
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 |
|
Super. 😃 I will answer you questions
The implementation is relying on that aerospace does - it contains no logic only presentation of current state.
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...
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... 🫤
This is expected. I dont want the extension to mess up the bar. So i only present 1 app. Maybe it could improved ?
I want to keep the PR minimal - i could be done but i like to KISS for how
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..
I am hoping you will continue review this PR - i am open for questions and improvements. Regards Kim. |


Summary
i3OrderedWithAppIconsmenu 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 checkWorkflow / 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
ExperimentalUISettings.swift— new enum case (+2 lines)TrayMenuModel.swift—AppViewModelstruct,resolveAppIcon()with 4-strategy cascading fallback, gated construction so other styles pay zero cost (+50 lines, zero existing lines modified)MenuBarLabel.swift— extracted sharedorderedWorkspacesView(showApps:)helper that serves bothi3Orderedandi3OrderedWithAppIcons, reducing duplication (+63/-16 lines)Design decisions
resolveAppIcon()only runs when this style is active — all other styles have zero overheadi3Orderedinline code was refactored into a reusable method, so both styles benefit from cleaner structureNSRunningApplication.icon→NSWorkspace.icon(forFile: bundlePath)→ resolvebundleId→ URL → icon → genericNSImage.applicationIconNameallLeafWindowsRecursive(DFS order)All 106 existing tests pass.