Skip to content

Add display-mode setting (dock / menu bar / hidden)#6

Merged
peterp merged 2 commits intomainfrom
feat/display-mode
Apr 28, 2026
Merged

Add display-mode setting (dock / menu bar / hidden)#6
peterp merged 2 commits intomainfrom
feat/display-mode

Conversation

@peterp
Copy link
Copy Markdown
Owner

@peterp peterp commented Apr 28, 2026

New "Show app in" picker in Settings, persisted to `config.json` and applied live:

  • Dock — current behavior (`.regular`).
  • Menu Bar — `.accessory` + an `NSStatusItem` mirroring the Dock menu.
  • Hidden — `.accessory` with no status item. Re-launching cmdcmd.app reopens Settings via `applicationShouldHandleReopen`.

Hidden mode uses `.accessory`, not `.prohibited`, so macOS keeps the single-instance launch behavior — relaunching the .app brings the running process back to Settings instead of spawning a duplicate.

The unconditional `setActivationPolicy(.regular)` at launch is gone, so config wins on cold start.

Credit to @plyght — concept from #1, simplified.

Test plan

  • `./build-app.sh && open cmdcmd.app`
  • Default (no displayMode in config) → still appears in Dock
  • Switch to Menu Bar → Dock icon disappears, status-bar icon appears, menu shows Settings/Open Config/Check for Updates/Quit
  • Switch to Hidden → both Dock and menu-bar icons gone; ⌘⌘ still triggers overlay
  • In Hidden mode, double-click cmdcmd.app in Finder → Settings window reopens (no duplicate process)
  • Restart app — chosen mode persists
  • Quit from status-bar menu works

🤖 Generated with Claude Code

peterp and others added 2 commits April 28, 2026 22:30
New "Show app in" picker in Settings:

- Dock — current behavior, regular activation policy.
- Menu Bar — accessory mode with an NSStatusItem that mirrors the
  Dock menu (Settings, Open Config, Check for Updates, Quit).
- Hidden — accessory mode with no status item or Dock icon.
  Re-launching cmdcmd.app reopens Settings via applicationShouldHandleReopen.

Mode is persisted to config.json via the in-place patcher and applied
live without restart. Removes the unconditional setActivationPolicy(.regular)
at launch so config wins on cold start.

Hidden uses .accessory rather than .prohibited so single-instance
relaunch behavior keeps working.

Co-Authored-By: plyght <plyght@peril.lol>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The colorful ⌘⌘ app icon doesn't follow the standard monochrome
template-image convention. Switched to the system "command" SF Symbol
(template = true) so the system tints it correctly across light/dark
and accent-color menu bars.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@peterp peterp merged commit ef8e739 into main Apr 28, 2026
1 check passed
@peterp peterp deleted the feat/display-mode branch April 28, 2026 20:35
@peterp peterp mentioned this pull request Apr 28, 2026
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