Skip to content
New issue

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

feature request: first class support for binary plugins #718

Open
bilal-fazlani opened this issue May 1, 2021 · 3 comments
Open

feature request: first class support for binary plugins #718

bilal-fazlani opened this issue May 1, 2021 · 3 comments
Labels

Comments

@bilal-fazlani
Copy link

Hi,

Thank you for reviving this project.

I am a Scala developer and I would like to develop plugins for xbar.

I am currently successfully able to write Scala/Java compiled plugins using Swiftbar.

In order to accomplish the same in xbar, I need two things

  1. Ability to add metadata to a binary file
  2. Plugin path (full path, including plugin file name) as env variable

These two things will enable developers to compile a binary plugin file which simply outputs texts. Using any programming language. These compiled plugins don't require bash or any other shell and can be directly invoked.

Currently, Swiftbar is using xattr mechanism to read metadata from binary plugins. And it provides SWIFTBAR_PLUGIN_PATH env variable.

@matryer
Copy link
Owner

matryer commented May 21, 2021

@bilal-fazlani Thanks for opening this, it is indeed something we want to do. Adding metadata to the binary is an interesting challenge. xattr is fine for macs, but xbar plans to become cross-platform in the future, so we may need a more agnostic way to solve this.

@leaanthony and I will ponder it. Any other ideas are welcome.

@chadcatlett
Copy link

I like the idea of extended attributes, but I know they can be a headache with different limitations based on the OS and even the underlying filesystem.

Another option would be to come up with an invocation standard that causes a plugin to return its metadata in a specific format. This could be the existing metadata format sent to stdout or whatever you decide on.

@bilal-fazlani
Copy link
Author

Has there been any new thoughts on this? @matryer
Providing a way for compiled plugins to specify metadata will be really useful.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants