swiftbar / SwiftBar

Powerful macOS menu bar customization tool
https://swiftbar.app
MIT License
2.87k stars 91 forks source link

Ephemeral Plugins #357

Closed melonamin closed 1 year ago

melonamin commented 1 year ago

Problem

Currently, SwiftBar is great at:

SwiftBar is not great at showing transient menubar items. A basic example: you launch a long shell process and want to have an indication(red or green circle) in the menu bar when it finishes. Currently, there is no easy way to do this.

Solution

Add Ephemeral plugins, so you can tell SwiftBar to show a menubar item without adding a plugin.

Key features:

jasonsnell commented 1 year ago

Love this idea. I think the key is going to be the ability for them to be unique, and addressable. So either the scripter would need to assign them a name, or SwiftBar would need to assign them an ID of some kind that's returned as output. That way, I can keep updating my status item as it moves through the process.

jasonsnell commented 11 months ago

So is there documentation somewhere on how to make an ephemeral plugin?

melonamin commented 11 months ago

One of the reasons it is still in beta - I didn't have time to write the docs 😭

It is pretty easy to use, you have 3 parameters

You can use it with URL scheme: swiftbar://setephemeralplugin?name=...content=... or thorugh new Shorctuts action "Set Ephemeral Plugin"

melonamin commented 11 months ago

@jasonsnell have you had a chance to try it yet?

jasonsnell commented 11 months ago

Yep! Added it to my loooong transcription shortcut and it seems to have worked?