SwiftBar icon indicating copy to clipboard operation
SwiftBar copied to clipboard

SWIFTBAR_PLUGIN_REFRESH_REASON does not update

Open EddiG opened this issue 7 months ago • 0 comments

Describe the bug The SWIFTBAR_PLUGIN_REFRESH_REASON environment variable is stuck in MenuOpen state.

To Reproduce Steps to reproduce the behavior:

  1. Create state_issue_test.5s.sh plugin with the content below
  2. Make sure that you see Schedule state in the system tray
  3. Open plugin menu. The state shows MenuOpen.
  4. Wait more than 5 seconds
  5. State still shows MenuOpen

Expected behavior The SWIFTBAR_PLUGIN_REFRESH_REASON env variable must show Schedule state if the menu is closed and the next scheduled update happend.

Screenshots ~~If applicable, add screenshots to help explain your problem.~~

Environment:

  • macOS version: 15.6.1
  • SwiftBar version: 2.0.1 (536)

Plugin Example:

#!/bin/bash
# <swiftbar.refreshOnOpen>true</swiftbar.refreshOnOpen>

echo "$SWIFTBAR_PLUGIN_REFRESH_REASON"
echo "---"

Additional Context:

  • [x] I don't run Bartender/Dozer/etc. or tested the issue without it running

EddiG avatar Sep 18 '25 09:09 EddiG