Closed kdeldycke closed 2 years ago
Hey @kdeldycke
You are using the following syntax: <Item Title> | param = ... | param = ... | param = ...
. Where is it coming from?
Per Readme <Item Title> | [param = ...]
, where:
And your simplified example should look like this:
print(
"""↑4 | dropdown=false
---
Homebrew Formulae: 3 packages | font=Menlo emojize=false
--broot 1.11.0 → 1.11.1 | font=Menlo refresh=true shell=/opt/homebrew/bin/brew param1=upgrade param2=broot param3=--formula terminal=true
-----
--Upgrade all | shell=/opt/homebrew/bin/brew param1=upgrade param2=None param3=--formula font=Menlo refresh=true terminal=false
"""
)
I hope it helps.
Oh I see. <Item Title> | param = ... | param = ... | param = ...
is from the bitbar/xbar specifications.
I'll try to have my script works for both xbar and SwiftBar them. Thanks for the tip and sorry for the noise! 😅
bitbar/xbar specifications
I don't believe that Bitbar ever behaved like this, I re-implemented the specification 1-to-1. Looks like it was added as a part of xbar evolution, I have no idea why...
I'll try to have my script works for both xbar and SwiftBar them
I suggest you to try the SwiftBar\bitbar syntax first and see if it works in xbar.
I don't believe that Bitbar ever behaved like this, I re-implemented the specification 1-to-1. Looks like it was added as a part of xbar evolution, I have no idea why...
Indeed, this seems like a recent addition. Still, you're right: the pipe separator is supported but optional. I guess we'll see more of these pipe-separated parameters from the plugin repository now that the cat is out of the bag.
As for the reason this was added, maybe it is to make the parser more robust. I might even have encountered some edge-cases, but need to experiment more on my side.
Describe the bug
It seems that an entry in a sub-menu is not allowed to be clicked and is greyed out each time a font-related option (like
font=
oremojize=
) is used.To Reproduce
Here is a simple script printing a string:
This renders as:
Now if I change that script to (notice the addition of
| font=Menlo |
to thebroot
line):It renders as:
You can notice how the submenu item is disabled and greyed-out.
Instead, I expect it to be enabled.
Environment:
Plugin Example: This issue has been simplified but was encountered with the latest version (
v4.12.1
) of themeta_package_manager.7h.py
plugin.