Status Bar item with a menu

12 views
Skip to first unread message

Sillyfrog

unread,
Apr 28, 2022, 5:02:00 PMApr 28
to iterm2-discuss
Hi,

I'm looking to create a new status bar item (with the Python API), that when clicked, it provides a menu of options (just like the built in git status item).

I've looked at the examples and searched, and I feel like I'm missing something, but I can't figure it out. I've seen the web view option (that's my fall back plan, but will require me running a web service etc to get call backs when clicked).

Any pointer appreciated!

PS: The goal would be to show the current Kubernetes context (which has been done before), but I'd like to also provide a menu of available options to quickly change context.

Thanks!

George Nachman

unread,
Jun 16, 2022, 1:23:32 PMJun 16
to iterm2-...@googlegroups.com
Sorry for the delay in getting back to you.

There is no api for opening a menu, but there is one to open a popover with a web view inside. Here’s an example script that uses the async_open_popover API:



--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/54fcf90b-df1e-4e26-979d-c00141340a3bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages