Open fenhl opened 3 years ago
@fenhl I'd support this, do you fancy doing a PR?
I don't know enough about Go or the project structure, sorry.
Hi, I'm trying to write a plugin, that needs to know whether it is run by xbar or SwiftBar. SwiftBar offers environment variables like SWIFTBAR="1" and SWIFTBAR_VERSION="x.y.z". Would be nice to have at least those two as XBAR and XBAR_VERSION, too. See https://github.com/swiftbar/SwiftBar?tab=readme-ov-file#environment-variables
I would like to write plugins that are compatible with xbar as well as the old BitBar app and the alternative implementation SwiftBar. As such it would be nice to have an environment variable to be able to identify the app running the plugin as xbar, ideally with version info, e.g.
XBAR_VERSION=x.y.z
. That way I would be able to make full use of the features available in the given implementation and version, with graceful fallbacks for unsupported features.