Find tab for tmux session with Python API

16 views
Skip to first unread message

Travis B. Hartwell

unread,
Jan 28, 2022, 9:47:30 AM1/28/22
to iterm2-discuss
I am trying to write scripts to do, among other things, if I am already attached to a name tmux session, switch to a tab where it is active.

I can iterate through the current tmux sessions with:

tmux_connections = await iterm2.tmux.async_get_tmux_connections(connection)

for connection in tmux_connections:
   ...

However, when I find the tmux session I want, when I iterate through all of the windows and a tabs, none of the tabs have a tmux_connection_id set, so I am unsure of how to match the tab.

The code I am attempting to do this with can be found in this gist:

Is there a way to do what I want?


George Nachman

unread,
Feb 3, 2022, 8:38:09 PM2/3/22
to iterm2-...@googlegroups.com
I think you hit issue #9889, which is fixed in the beta of 3.5.0.

--
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/384a15c4-ec8f-42cf-9cd0-da42c7d57a7an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages