Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display hostname in window format #178

Closed
divansantana opened this issue Aug 11, 2018 · 3 comments
Closed

display hostname in window format #178

divansantana opened this issue Aug 11, 2018 · 3 comments

Comments

@divansantana
Copy link

divansantana commented Aug 11, 2018

Greetings πŸ˜„

How does one display hostname automatically in the window format?

It seems to detect the hostname correctly and display it in bottom right by default. But I'd like it on the tmux "window tab".

I've tried:

~ ᐅ tmux setw -g window-status-current-format "#{hostname_ssh}"                                                               
~ ᐅ tmux setw -g window-status-format "#{hostname_ssh}"

And similar.

Also:

tmux_conf_theme_window_status_current_format='{#hostname}'

But it seems that doesn't work and is blank.

@divansantana
Copy link
Author

I'm also using zsh and oh-my-zsh.

It seems this works

tmux setw -g window-status-format "#{window_index}:#{pane_title}"
tmux setw -g window-format "#{window_index}:#{pane_title}"

but is not as ideal as #{hostname} would be.

The former shows tabs like this 2:root@omd: ~ and 3:ssh git.santanas.co.za

which is not as ideal as just displaying the hostname.

gpakosz added a commit that referenced this issue Aug 11, 2018
tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format
variables now understand:
  - #{circled_session_name}
  - #{hostname}
  - #{hostname_ssh}
  - #{username}
  - #{username_ssh}
@gpakosz
Copy link
Owner

gpakosz commented Aug 11, 2018

Hey @divansantana πŸ‘‹

Can you please give the gh-168-178 branch a try?

@divansantana
Copy link
Author

@gpakosz This works great! Thanks for the very quick code.

So this works for me now:

tmux_conf_theme_window_status_format='#I #{hostname_ssh}'
tmux_conf_theme_window_status_current_format='#I #{hostname_ssh}'

This is great thanks a lot!

jpaern pushed a commit to jpaern/.tmux that referenced this issue Dec 5, 2018
tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format
variables now understand:
  - #{circled_session_name}
  - #{hostname}
  - #{hostname_ssh}
  - #{username}
  - #{username_ssh}
nks5295 pushed a commit to nks5295/.tmux that referenced this issue Apr 26, 2019
tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format
variables now understand:
  - #{circled_session_name}
  - #{hostname}
  - #{hostname_ssh}
  - #{username}
  - #{username_ssh}
alipiry pushed a commit to alipiry/.tmux that referenced this issue Jan 5, 2020
tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format
variables now understand:
  - #{circled_session_name}
  - #{hostname}
  - #{hostname_ssh}
  - #{username}
  - #{username_ssh}
wzdiyb pushed a commit to wzdiyb/.tmux that referenced this issue Feb 16, 2020
tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format
variables now understand:
  - #{circled_session_name}
  - #{hostname}
  - #{hostname_ssh}
  - #{username}
  - #{username_ssh}
psjay pushed a commit to psjay/.tmux that referenced this issue Mar 17, 2020
tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format
variables now understand:
  - #{circled_session_name}
  - #{hostname}
  - #{hostname_ssh}
  - #{username}
  - #{username_ssh}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants