Skip to content

Check whether a bar is running, print its version and quit it from the command line #300

Closed

Description

@M4n0x

Problem

  • Every failure exits with status 1 (StableBarApp.swift:90-92), so a script can't tell "no bar runs this configuration" from a bad argument or a refused edit. Without --config, --trigger and --reload post a notification and exit 0 even when no bar is running.
  • There's no --version, and --query doesn't include the version. It's in Finder's Get Info, or defaults read on the app's Info.plist.
  • Nothing quits one bar. Quitting the app by name can't say which configuration's bar to quit, so with a second bar on a scratch configuration, as AGENTS.md describes for development, the only safe way to stop it is its PID.

Hammerspoon's hs -a exits 75 when the app isn't running, eww and ironbar answer ping, and SketchyBar has --exit.

Proposal

  • StableBar --version prints the version, build and channel, and --query includes them.
  • StableBar --status prints {"running": true, "version": "...", "pid": 123, "configuration": "..."} and exits 0 when a bar runs the configuration, and exits with a distinct status (for example 3) when none does. Every live command uses that status when no bar runs the configuration. RuntimeControl.isRunning (RuntimeControl.swift:72-74) already checks this.
  • StableBar --quit quits the bar running the configuration, as Quit StableBar in its menu does. With --config, only that configuration's bar quits.
  • docs/command-line.md lists the exit statuses.

Possible today

Partly. StableBar --query fails when no bar runs the configuration, with the same status as every other error.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    enhancement
    on Oct 23, 2026
  2. added
    P3
    on Nov 8, 2026
  3. self-assigned this
    on Nov 16, 2026
  4. stablebar-releases commented on Nov 20, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.18.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3enhancementreleased

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions