FR: tmux integration - opening new tabs in the current window from shell
from my goog-group post
I use tmux-integrated windows a lot and sometimes I want to script their layouts in the shell instead of using an iTerm profile.
If I tmux neww
, I end up with an new window instead of a new iTerm tab.
I don't see any nice way to specify "tabbyness" from the shell, but that state clearly exists if you reconnect to a tmux session with tabs created by iTerm hotkey.
tmux show
displays iTerm's metadata for the windows and I've found how to "rejoin" them from the shell, but a disconnect & reconnect is required.
<545> $ tmux lsw
1: bash* (1 panes) [272x59] [layout d35d,272x59,0,0,0] @0 (active) #inital window
2: bash- (1 panes) [272x59] [layout d35f,272x59,0,0,2] @2 # hotkey'd new tab
3: bash (1 panes) [272x59] [layout d360,272x59,0,0,3] @3 # shell'd new window
<546> $ tmux show
@affinities "pty-FF7BAFB7-29C3-4809-BCB7-BFF3C585BFC4; pty-7DAA0A7E-2163-4EB0-A78F-2C2C85160A5E;WindowStyle=FullScreen pty-2DB2B8C0-DE19-4489-837A-E5637AC6CC9C; pty-AA4757AA-6C6C-4339-BCDC-A482FE02D1C6;WindowStyle=FullScreen pty-B93D4284-BEC1-445E-8228-F91C26152F86; 0,2,pty-1FF8A8D1-10DE-4C38-8C0F-97311CE800CF;WindowStyle=FullScreen 3,pty-30095539-3357-4206-B7A0-BF7CB81917E8;WindowStyle=FullScreen"
@iterm2_id "26719F09-6C76-4BD5-A540-818B1CF2D62C"
@iterm2_size "272,59"
@origins "3:-480,900 0,2:-480,900"
<547> $ tmux set @origins "0,2,3:-480,900"
<548> $ tmux set @affinities "pty-FF7BAFB7-29C3-4809-BCB7-BFF3C585BFC4; pty-7DAA0A7E-2163-4EB0-A78F-2C2C85160A5E;WindowStyle=FullScreen pty-2DB2B8C0-DE19-4489-837A-E5637AC6CC9C; pty-AA4757AA-6C6C-4339-BCDC-A482FE02D1C6;WindowStyle=FullScreen pty-B93D4284-BEC1-445E-8228-F91C26152F86; 0,2,3,pty-1FF8A8D1-10DE-4C38-8C0F-97311CE800CF;WindowStyle=FullScreen"
# disconnected & reconnected, now have 3 tabs in one window
<549> $ tmux show
@affinities "pty-FF7BAFB7-29C3-4809-BCB7-BFF3C585BFC4; pty-7DAA0A7E-2163-4EB0-A78F-2C2C85160A5E;WindowStyle=FullScreen pty-2DB2B8C0-DE19-4489-837A-E5637AC6CC9C; pty-AA4757AA-6C6C-4339-BCDC-A482FE02D1C6;WindowStyle=FullScreen pty-D8B17BD8-3A03-4B0A-8015-A47A66DF9202; 0,2,3,pty-FBD143B6-28C4-4696-AB96-A6A7EBA438E7;WindowStyle=FullScreen"
@iterm2_id "26719F09-6C76-4BD5-A540-818B1CF2D62C"
@iterm2_size "270,59"
@origins "3,2,0:-480,900"
Is there a way to make iTerm "resync" its layout from the tmux options without doing a disconnect/reconnect?