diff --git a/.tmux.conf b/.tmux.conf index c6269f4..24b3fd0 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -39,10 +39,16 @@ set-option -g history-limit 10000 set -g status on set -g status-keys vi +# check config file is readen +# set -g status-left "CONFIG OK" + +# Si connecté en SSH, changer la bg en red, sino en gree +if-shell 'env | grep -q SSH_CONNECTION' \ + 'set -g @bg red' \ + 'set -g @bg green' +set -g status-style "bg=#{@bg} fg=black italics" # change color -set -g status-style 'bg=green fg=black italics' -# time et hostname -set -g status-right "#[fg=blue bg=black noitalics bold] %R #[fg=yellow nobold]#{user}#[fg=white bg=black noitalics bold]@#h #[bg=green fg=black ] " +set -g status-right "#[fg=blue bg=black noitalics bold] %R #[fg=yellow nobold italics]#{user}#[fg=white noitalics]@#[fg=#{@bg} bg=black noitalics bold]#h #[bg=#{@bg} fg=black ] " # reload this file bind r source-file /home/patrick/.tmux.conf \; display-message ".tmux.conf reloaded"