[tmux] Set statusline depending on Customer + Environment.

This commit is contained in:
Sebastian Schulze 2017-02-20 13:23:26 +01:00
parent 619336dc00
commit b7a7bd3dba
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
2 changed files with 12 additions and 2 deletions

View File

@ -30,7 +30,6 @@ set -gw mouse on
set -g status-justify centre
set -g status-left ""
set -g status-right "#S@#H[$VM_IP]"
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
@ -42,7 +41,7 @@ set -g visual-activity on
set-window-option -g window-status-current-format "#[fg=red]#[fg=white]#I#F$ #W#[fg=red]"
set -g status-bg '#151515'
set -g status-fg "#c3c3c3"
setw -g window-status-current-bg '#ee2e24'
setw -g window-status-current-bg 'colour12'
setw -g window-status-current-fg '#ffffff'
setw -g window-status-activity-fg '#151515'
setw -g window-status-activity-bg '#ee2e24'
@ -58,3 +57,5 @@ set -g message-command-bg "#8abeb7"
set -g message-command-fg "#000000"
set -g mode-bg "#8f9d6a"
set -g mode-fg "#ffffff"
run-shell "~/bin/tmux-statusline"

9
home/bin/tmux-statusline Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
if [[ -f "/var/run/vm_ip" ]]; then
tmux set -g status-right "#S@#H[#{cat /var/run/vm_ip}]"
tmux setw -g status-bg 'colour24'
else
tmux set -g status-right "#S"
tmux setw -g status-bg 'colour0'
fi;