diff --git a/home/.tmux.conf b/home/.tmux.conf index 13af0b5..683c475 100644 --- a/home/.tmux.conf +++ b/home/.tmux.conf @@ -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" diff --git a/home/bin/tmux-statusline b/home/bin/tmux-statusline new file mode 100755 index 0000000..0a8fb58 --- /dev/null +++ b/home/bin/tmux-statusline @@ -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;