Closed mlcampbe closed 2 years ago
Hi Mike, are you sure it was working in 1.3.0? I just downloaded it and tested - adding .off doesn't disable the plugin.
Overall even if it worked it's not expected behavior, what happens when you rename a file:
So when you're renaming a file, from SwiftBar perspective you've added a new plugin and removed another one.
To address your need I've added the following URL Scheme path's:
Endpoint | Parameter | Description | Example |
---|---|---|---|
enableplugin | name plugin name |
Enable plugin by name | swiftbar://enableplugin?name=myplugin |
disableplugin | name plugin name |
Disable plugin by name | swiftbar://disableplugin?name=myplugin |
toggleplugin | name plugin name |
Toggle(enable\disable) plugin by name | swiftbar://toggleplugin?name=myplugin |
Call it like this open -g "swiftbar://toggle?name=cal"
I am pretty sure that just renaming the file worked in 1.3.0 because I use that method to enable/disable a battery level plugin depending if I am on battery or AC. But, the newly added API calls will be much better in the long run. Thanks for the quick reply.
With the v1.3.0 release I could enable/disable a plugin by simply renaming the shell script. For example:
mv script.15s.sh script.15s.sh.off would disable it and going the other way would enable it.
But now with v1.4.0 that does not seem to be working anymore so I suspect some type of caching going on that I am unaware of. I do notice that in the Library/Application Support/SwiftBar/Plugins folder I have a directory for each of my plugins but that directory is empty.
I can still enable/disable a plugin by using the preferences pane and the checkbox but was really looking to do so from the command line again.
Any ideas why this behavior has changed?