Hi,
I log in to a server that I use as home base. Let's call it "granite" for
example's sake. It has my ssh key and then from there, I connect to all my
other servers via ssh from granite. I can connect to granite from my
laptop, home computer, work computer, or other computer, and then reattach
to tmux. This is very convenient. Because I have a lot of tmux windows open
at once, I have shortened my window status format to just
#{window_index}:{#window_name} (no flags, because I use background color to
highlight the current window in the window status bar). I make the window
name just the host name, so on granite it shows the names of the remote
server that I am connected to via ssh. I do this using PROMPT_COMMAND on
the remote servers. My PROMPT_COMMAND is set to the following command:
echo -ne "\033k${HOSTNAME%%.*}\033\\"
My status bar thus looks something like this:
0:poppy 1:lilliput 2:flipper 3:onyx
(those are all hypothetical remote host names, reached via ssh from granite)
I noticed that tmux 2.7 made some changes with the allow-rename window
option and the automatic-rename feature. They are nice, and I would like to
use them for local processes running on granite so that, for instance, my
window status might look like this:
0:poppy 1:lilliput 2:flipper 3:onyx 4:emacs 5:top
(0 - 3 are remote hosts I have connected to using ssh, 4 and 5 are local
processes run on granite)
Do you have any suggestions for how I can accomplish this with tmux 2.7?
Can I have tmux parse the command and, when it is ssh, parse the command
line arguments to pluck off the hostname (chop the suffix, so no FQDN) and
display the remote host in the window status, but if it is a local command,
use the default automatic-rename-format?
Additionally, is there a way I can make local processes show up in a
different color to distinguish remote host from local process?
Wellie
--
You received this message because you are subscribed to the Google Groups
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.