Repository navigation
Closed
Labels
Description
Problem
A widget script that calls the command line, to trigger an event, refresh another widget or open a popup, has two gaps:
- It doesn't know where StableBar is. The guide's examples use
/path/to/StableBar.app/Contents/MacOS/StableBar(create-a-widget.md:68-69). Thestablebarcommand exists only once Settings installs it, and it runs the copy in Applications, which may not be the build running the script, such as a development build. - It doesn't know its configuration. Scripts get
CONFIG_DIRbut not the file (BarStore.swift:975-980). Without--config,--refresh,--popupand--queryaddress the default configuration, and--triggerbroadcasts to every bar (command-line.md:37). A script in a bar started with--config ~/work/bar.jsonreaches the wrong bar, or all of them.
SketchyBar passes $BAR_NAME for the same reason, and SwiftBar passes each plugin its cache and data folders.
Proposal
- Commands get
STABLEBAR, the path of the running executable, andSTABLEBAR_CONFIG, the configuration file's path. As withNAMEandCONFIG_DIR, event data can't replace them. - The command line uses
STABLEBAR_CONFIGas its configuration when--configisn't given, so"$STABLEBAR" --trigger donein a widget script reaches the bar that ran it. - The guide's examples use
"$STABLEBAR". - Open question: without
--config,--triggerbroadcasts to every bar for compatibility. WithSTABLEBAR_CONFIGset, it would reach one bar; scripts that relied on the broadcast would need--triggerfrom outside a widget.
Possible today
Partly. The top-level environment can set both paths by hand, and the script passes --config itself.
Related
- Install a stablebar command from Settings #255 added the
stablebarcommand. - Trigger and notification data can replace PATH and other variables widget commands rely on #5 kept trigger and notification data from replacing
PATHand other variables; the new variables need the same protection.
Triaged by Claude 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 📦🚀