Open divansantana opened 6 years ago
$ tmux setw automatic-rename-format '#{?pane_in_mode,[tmux],#{?#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D),#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D),#{pane_current_command}}}#{?pane_dead,[dead],}'
This mostly does what you want but
I'm not sure how to achieve it efficiently for now
@gpakosz Cool this is minor. It doesn't really bother me too much.
Thanks!
Hi @divansantana
The following should be less heavy
tmux setw -g automatic-rename-format "#{?pane_in_mode,[tmux],#{?#{m:*ssh,#{pane_current_command}},#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D),#{pane_current_command}}}#{?pane_dead,[dead],}"
Hi @gpakosz,
Can you tell me where to run this? I tried it just in bash on the machine running tmux and also putting it in my .tmux.conf.local
file but it doesn't do anything for me.
Now that #178 is sorted, a separate much more minor issue :grimacing:
How does one achieve something like this:
IE display the command if local, else display the ssh hostname. This almost works.
The above results in something like this which is a little less ideal because of screen estate: