From 655e1ea802d000b412391f81bd14370bdd246da0 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 7 Apr 2018 14:25:58 -0500 Subject: [PATCH] Move session list to the right so its less distracting --- scripts/bin/tmux-session-list | 8 +++----- shell/tmux.conf | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/bin/tmux-session-list b/scripts/bin/tmux-session-list index dedb860..f601191 100755 --- a/scripts/bin/tmux-session-list +++ b/scripts/bin/tmux-session-list @@ -17,13 +17,11 @@ TMUX_SESSION_LIST="$(tmux list-sessions | awk \ -v assuf="${ANY_SESSION_SUFFIX}" \ -v cspre="${CUR_SESSION_PREFIX}" \ -v cssuf="${CUR_SESSION_SUFFIX}" \ -'{ -s=substr($1,0,length($1)-1); +'{s=substr($1,0,length($1)-1); if(s==cursesh){ s=cspre" "s" "cssuf }else{ s=aspre" "s" "assuf -}printf s -}')" +}printf s}')" -echo "${TMUX_SESSION_LIST}" +echo "${TMUX_SESSION_LIST//\s*$/}" | sed -e 's/\s*$//' diff --git a/shell/tmux.conf b/shell/tmux.conf index 09686b2..cb7d1ad 100644 --- a/shell/tmux.conf +++ b/shell/tmux.conf @@ -51,8 +51,8 @@ set -g status-right-length 20 set -g status-interval 1 # set status-interval 1 -set -g status-left '#(#{DOTFILES_PATH}/scripts/bin/tmux-session-list #S)#[fg=colour18]#[bg=default]|#[fg=colour7] #W' -set -g status-left-length 200 +set -g status-right '#[fg=colour4]#W #[fg=colour18]#[bg=default]|#[fg=colour7] #(#{DOTFILES_PATH}/scripts/bin/tmux-session-list #S)' +set -g status-right-length 200 setw -g window-status-current-fg colour7 setw -g window-status-current-bg colour2