We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/matryer/xbar-plugins/blob/main/CONTRIBUTING.md#plugin-variable-json-files :
You can programmatically modify the JSON files to adjust the values. Use the refresh control API above to refresh plugins after changing variables.
~/Library/Application Support/xbar/plugins/config_refresh_issue.sh:
#!/usr/bin/env bash set -eo pipefail IFS=$'\n\t' # <xbar.var>string(VAR_TEST="initial"): Test</xbar.var> config_file="$0.vars.json" if [[ $1 == modify ]]; then sed -i '' -E "s/(\"VAR_TEST\": \")[[:alnum:]]*/\1$RANDOM/" "$config_file" fi echo '🧪' echo '---' echo "Modify config | bash=$0 | param1=modify | refresh=true" echo "VAR_TEST=\"$VAR_TEST\""
To reproduce: Hit "Modify config" in the plugin menu Actual: VAR_TEST remains the same in the menu Expected: VAR_TEST reflects the change
The file itself (~/Library/Application Support/xbar/plugins/config_refresh_issue.sh.vars.json) changes, it's just not reflected in the running plugin.
Hitting the submenu item "xbar > Refresh" doesn't work.
Workaround: submenu "xbar > Refresh all" (or reopen the xbar app). Or get configs manually, e.g.:
config=$(< "$config_file") function get_config() { grep "$1" <<< "$config" | cut -d' ' -f2 | tr -d '",' } VAR_TEST=$(get_config 'VAR_TEST')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://github.com/matryer/xbar-plugins/blob/main/CONTRIBUTING.md#plugin-variable-json-files :
~/Library/Application Support/xbar/plugins/config_refresh_issue.sh:
To reproduce: Hit "Modify config" in the plugin menu
Actual: VAR_TEST remains the same in the menu
Expected: VAR_TEST reflects the change
The file itself (~/Library/Application Support/xbar/plugins/config_refresh_issue.sh.vars.json) changes, it's just not reflected in the running plugin.
Hitting the submenu item "xbar > Refresh" doesn't work.
Workaround: submenu "xbar > Refresh all" (or reopen the xbar app). Or get configs manually, e.g.:
The text was updated successfully, but these errors were encountered: