Closed brobee closed 5 years ago
You could read/write a config file.
Read on script run. Write on menu item selection.
Thanks for your comment. Can you please provide a short example?
Here are some that do that kind of thing:
I found a workaround with submenus using "----", so ticker/selector is not mandatory. (In the example files, I don't see selector and variable assignment)
Anyway, If I have a shell function, is it possible to call that or it works only with individual files?
For instance, it requires files, not functions. echo "--build | bash=/Users...../bla -> echo "--build | bash=bla" bla is a normal function in the same shell file.
You seem to be thinking about the script as only bitbar commands that you have to squeeze everything into. This is not the case.
You have the complete freedom of a shell script, part of which will generate the bitbar menu. So I would write the script as you need it, with conditional logic for branches, and then when it's working add in the bitbar stuff for "user interface".
If you need help beyond this, you might have some response at StackOverflow.
I'm closing the issue, but feel free to keep in touch here.
Hi Guys,
Is it possible to implement a selector/ticker in bitbar? My idea is to run a script on different servers with different functions Let's say in the menu, there is an environment submenu with 3 options. I select dev, it saves and I can select the function, for instance build and it initiates my bash script. Optional: input is possible in bitbar?
I use bash, but py would be fine as well, but without any example I'm totally stucked.
Thanks!