You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to integrate the variables feature into some of my plugins, and I've tried everything I could think of to change the values of these variables from the UI (in the ⌘+E panel for a plugin), but nothing has worked so far.
I started with the most basic plugin, saved as test.sh:
When I opened the plugin settings, I could see the two variables and their default values:
I tried changing these strings – meaning setting a custom value that's different from the default – and I was expecting to see test.sh.vars.json show up in the plugins directory, but no file was created. As soon as I navigated away from the details panel for this plugin and went back, the variables had been reset to their default values.
I figured if xbar couldn't create the JSON file, maybe I could create it and it would be able to edit it. So I added test.sh.vars.json with the following contents:
And after restarting the app I did see these values… not only in the menu bar:
but in the plugin config panel too:
There's even a label underneath that says "💡 You must refresh the plugin for changes to take effect."
The string fields are clearly editable, for variables defined as integers there are even up and down arrows to change the value, and booleans are displayed as checkboxes that can be changed too.
And here even though I had created the JSON file and xbar had managed to load values from it both at runtime and in the plugin config panel, nothing I did in the editor caused these values to be saved back into the file. I tried pressing Enter, I tried ⌘ + S, I tried ⌘ + R… nothing worked. The JSON file was never created if it didn't already exist, and was never updated if it did exist.
Is the editing feature for variables something that is not fully implemented yet? Or am I just using it wrong? (in which case how can I get xbar to save updated values for variables?)
The text was updated successfully, but these errors were encountered:
I now see the <name>.vars.json file being created when I make changes to variables in the plugin settings panel, and the plugin receives the expected values as environment variables when I press the ⟲ button at the top.
Hello,
I've been trying to integrate the variables feature into some of my plugins, and I've tried everything I could think of to change the values of these variables from the UI (in the ⌘+E panel for a plugin), but nothing has worked so far.
I started with the most basic plugin, saved as
test.sh
:When I opened the plugin settings, I could see the two variables and their default values:

I tried changing these strings – meaning setting a custom value that's different from the default – and I was expecting to see
test.sh.vars.json
show up in the plugins directory, but no file was created. As soon as I navigated away from the details panel for this plugin and went back, the variables had been reset to their default values.I figured if xbar couldn't create the JSON file, maybe I could create it and it would be able to edit it. So I added
test.sh.vars.json
with the following contents:And after restarting the app I did see these values… not only in the menu bar:

but in the plugin config panel too:

There's even a label underneath that says "💡 You must refresh the plugin for changes to take effect."
The string fields are clearly editable, for variables defined as integers there are even up and down arrows to change the value, and booleans are displayed as checkboxes that can be changed too.
And here even though I had created the JSON file and xbar had managed to load values from it both at runtime and in the plugin config panel, nothing I did in the editor caused these values to be saved back into the file. I tried pressing Enter, I tried ⌘ + S, I tried ⌘ + R… nothing worked. The JSON file was never created if it didn't already exist, and was never updated if it did exist.
Is the editing feature for variables something that is not fully implemented yet? Or am I just using it wrong? (in which case how can I get xbar to save updated values for variables?)
The text was updated successfully, but these errors were encountered: