Repository navigation
Description
Problem
Profiles can't tell where the Mac is or what it's doing, and the conditions they have are hard to set.
Too few conditions. Profiles match appearance, onBattery, displayCount, externalDisplay, app and theme (ProfileConditions in Sources/StableBar/ThemeConfiguration.swift). externalDisplay says whether any monitor is connected, not which one, so a profile can't apply only at home with the home monitor and stay off at the office with another. Nothing matches sharing the screen, for example to hide personal widgets during a call.
Hard to set. + Condition in Settings → Profiles opens a flat menu of nine items (conditionItems in Sources/StableBar/ProfilesView.swift):
- Opposites are separate items: Dark Mode / Light Mode, On battery / On power adapter, A monitor is connected / Only the laptop screen is connected. Each condition holds one value, so picking one silently replaces its opposite.
- The screen count item names the current count, such as "1 screen is connected". Another count needs the stepper on its chip afterwards.
- An app condition holds one app.
- The menu doesn't mark which conditions are set, and nothing shows which ones are true right now, so it's hard to tell why a profile is or isn't active.
- All conditions must match. There is no "any of" or "not".
Proposal
New conditions
Each with a coding key, a schema entry and an item in + Condition:
- A named monitor is connected:
"display": "LG HDR 4K", matched againstNSScreen.localizedName. + Condition lists the connected monitors by name. Open question: match by name, or by vendor, model and serial number (CGDisplayVendorNumber,CGDisplayModelNumber,CGDisplaySerialNumber) to tell two identical monitors apart. - On a Wi-Fi network:
"wifi": "Home", from the network name thewifiprovider already reads. macOS gives it only with Location access, which thewifiprovider already asks for; without it, the condition never matches. - In a call:
"camera": trueor"microphone": true, from what theprivacyprovider already watches, without a permission. - Sharing the screen: macOS has no public API that tells an app its screen is being captured. A private call would go in
PrivateAPI.swiftand needs a maintainer's OK. - Maybe: the connection type (
wifi,ethernet,offline) from thenetworkprovider, as a sign of being docked.
Each condition must update the active profiles when it changes, as appearance, power, screens and the focused app do through SystemContext (Sources/StableBar/SystemContext.swift).
An easier editor
- Group the menu under headings (Appearance, Power, Screens, Apps, Theme) and offer each kind once. Choose the value on the chip: Power: on battery ▾ switches to on power adapter, Screens: 2 ▾ picks a count, Monitor: LG HDR 4K ▾ picks a connected monitor.
- Mark each chip with whether it matches now, and name the condition that keeps an inactive profile off.
- Let an app condition list several apps.
appwould also accept an array, an additive configuration change. - Open question for a maintainer: "any of" and "not" need a configuration change.
The layout is a matter of taste: two or three renders for the maintainer to pick from.
Possible today
Partly:
externalDisplayanddisplayCountmatch any monitor, or a number of screens.- Screen setups give each combination of screen kinds (laptop, landscape monitor, vertical monitor) its own bar, not each monitor.
StableBar --profile NAMEfrom a Shortcuts automation, which can start on a Wi-Fi network on macOS 26, pins one profile and replaces automatic matching.- Edit as JSON… edits
whendirectly, with the same limits as the menu.
Related
- Let commands set conditions that profiles match, such as the current Focus #81 (closed, not planned) proposed letting commands set conditions for the Focus, being at the office or presenting. It was declined because
--profilecovers most of it. This asks for conditions StableBar checks itself. - Match profiles to the theme the bar is drawn with #696 added the
themecondition. - Edit profiles in the Customize window #9 added profile editing in Settings, Delete a profile from Settings → Profiles #667 added Delete profile, and Export a profile to a file and import it from Settings → Profiles #803 (open) adds export and import to the same page.
- Control StableBar from Shortcuts, Spotlight and stablebar:// links #205 (open) controls StableBar from Shortcuts.
Triaged by Claude Code via T3 Code (Claude Opus 5.5).
Activity
stablebar-releases commentedon Nov 20, 2026
🎉 This issue has been resolved in version 0.18.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀