tmux add red bg if ssh connection
This commit is contained in:
parent
cb122db07e
commit
e6764a482f
12
.tmux.conf
12
.tmux.conf
|
@ -39,10 +39,16 @@ set-option -g history-limit 10000
|
||||||
set -g status on
|
set -g status on
|
||||||
set -g status-keys vi
|
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
|
# change color
|
||||||
set -g status-style 'bg=green fg=black italics'
|
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 ] "
|
||||||
# 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 ] "
|
|
||||||
|
|
||||||
# reload this file
|
# reload this file
|
||||||
bind r source-file /home/patrick/.tmux.conf \; display-message ".tmux.conf reloaded"
|
bind r source-file /home/patrick/.tmux.conf \; display-message ".tmux.conf reloaded"
|
||||||
|
|
Loading…
Reference in New Issue