You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tmux plugin that enables displaying hostname and user of the current pane in your status bar.
Important
Replaces the #H default format variable
Usage
Basics
#H (#{hostname}) will be the hostname of your current path
#{hostname_short} will be the short hostname of your current path (up to the first dot)
#U (#{username}) will be current user name
Remote connection info
Plugin can detect pane has remote shell connection in several states:
ssh session inside pane
running docker (or podman) container
In both cases, #{hostname} and #{username} with show their values relatively to that state.
Besides #{hostname} and #{username} there are more usefull format variables:
#{pane_ssh_port} will show the connection port, otherwise it will be empty.
#{pane_ssh_connected} will be set to 1 if the currently selected pane has an active connection. (Useful for #{?#{pane_ssh_connected},ssh,no-ssh} which will evaluate to ssh if there is an active remote session in the currently selected pane and no-ssh otherwise.)
#{pane_ssh_connect} if an open remote session exists will show the connection info in "username@hostname:port" format, otherwise it will be empty.
Example
set -g status-left " #[bg=blue]#U#[bg=red]@#H#{?#{pane_ssh_port},:#{pane_ssh_port},}#[default] "