On Sun, May 19, 2013 at 3:55 PM, CSS <
c...@morefoo.com> wrote:
> I'm really liking the tmux integration and I'm using it pretty much exclusively on my laptop - the sessions live on a server, so I have access to picking up where I left off no matter where I am. It's really a huge feature and it makes things much easier.
>
> That said, I still have a few things I can't quite work out:
>
> * Naming tabs/windows (really, tmux windows is what I think I'm talking about) has me a bit lost. I know I can send escape codes to get a name in the tab or titlebar and that works fine. But that appears to only set the name of the iTerm tab or window, so when I disconnect the tmux session and reconnect it, my titles go away. Is there a way to name the actual tmux "window"? Is there a way to have iTerm inherit that name and display it?
If you use ESC k WindowName ^G then the actual tmux window will get
renamed. This is not true of ESC ] 2 ; WindowName ^G. You can also
rename windows in the Dashboard.
> * Another naming issue, by default it seems like all the tabs get labels like ">-> ssh: Shell" followed by whatever name I attach to the window/tab. With the tabs being relatively small, I can't actually see the actual name I've assigned as it's cut off. I assume "ssh" is the name of the command reported by tmux, I have no idea where "Shell" comes from. Is there a way to remove some of that leading text that I don't need? I do like the indicator that it's a tmux session, that actually takes up very little space and is easy to spot.
The "Shell" part is changeable in the Edit Current Session dialog
(cmd-I). Change the name there and it will replace Shell.
Unfortunately, it is not remembered, and this is an issue. Honestly,
window and tab names are a total mess and this is something I plan to
redo and simplify after 2.0 is out.
> * When I first started using tmux, I found that my window and tab arrangement was saved - I could disconnect the tmux session, reconnect it and everything came back as it was. At some point, I started getting the "Dashboard" instead. I figured this out - there's a pref under "General" labelled "Open Dashboard if there are more than X tmux windows", that was set to 10, and I apparently exceeded 10 at the same time I grabbed one of the iTerm updates, so I thought it was a change in default behavior. Anyhow, I'd like to be able to use the Dashboard sometimes, but since all the names listed there seem to just be the name of the running command, I have no idea which window is which (see
http://i.imgur.com/CPAmnSc.png). This relates to my first question above - I assume if I could figure out how to name tmux windows in iTerm the names in the Dashboard would follow. I must be overlooking something very obvious…
See my answer to your first question. The window title shown in the
dashboard reflects the tmux server's idea of the window title (as seen
in the output of the list-windows command).
> * At some point in the last week, I found that creating a new tmux tab using either the menu or the (insanely hard to type) shortcut SHIFT-CTRL-SPLAT-T no longer opens the tab in the active iTerm window, but rather the first window opened in my tmux session.
Protip: Cmd-T will open a tmux tab if your current tab is a tmux tab.
You can also assign a new shortcut for this in prefs>keys by using the
"Select Menu Item…" action, which lets you assign a key to any menu
item.
> Also, using the shortcut when I'm in a non-tmux iTerm window doesn't seem to do anything. Is this expected? Any chance we can set our own shortcut to opening a new tmux window/tab in the future? Can we have the tmux menu added to the right-click menu?
I'm looking in to this now.