From 91ed36318270aad1db3c16d3d56dba30db996d5b Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Tue, 27 Apr 2021 09:45:10 +0200 Subject: [PATCH] Better customization for tmux.conf Signed-off-by: Louis Vallat --- .tmux.conf | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 7eb1434..8cf8dde 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,23 +1,42 @@ -bind r source-file ~/.tmux.conf +# Colors +orange='#eb7718' +dark_blue='#001b2e' +blue='#294c60' +light_blue='#adb6c4' +beige='#ffefd3' +black='#000000' +white='#ffffff' -set -g default-terminal "screen-256color" -# tell Tmux that outside terminal supports true color -set -ga terminal-overrides ",xterm-256color*:Tc" +# r ==> reload quickly config file. +bind r source-file ~/.tmux.conf \; display "Reloaded!" +# Tell TMUX to use true color. +tmux_conf_theme_24b_colour=true +set -g default-terminal screen-256color +set -ga terminal-overrides ",xterm-256color:Tc" + +# Enable mouse mode set -g mouse on -setw -g mode-style 'fg=colour1 bg=colour18 bold' +# Auto set title and window title +set-window-option -g automatic-rename on +set -g set-titles on + +# Status bar configuration +#setw -g mode-style 'fg=colour255 bg=colour0' set -g status-position bottom set -g status-justify left -set -g status-style 'bg=colour237 fg=colour255 dim' -set -g status-left '' -set -g status-right '#h #[fg=colour255,bg=colour240] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S ' +set -g status-style "bg=${dark_blue} fg=${white}" set -g status-right-length 50 set -g status-left-length 20 -setw -g window-status-current-style 'fg=colour0 bg=colour208 bold' -setw -g window-status-current-format ' #I#[fg=colour0]:#[fg=colour15]#W#[fg=colour188]#F ' -setw -g window-status-style 'fg=colour188 bg=colour59' -setw -g window-status-format ' #I#[fg=colour32]:#[fg=colour250]#W#[fg=colour244]#F ' +set -g status-left '' +set -g status-right "#(echo $USER)@#h #[fg=${black}, bg=${light_blue}] #(cat /proc/loadavg | cut -d' ' -f 1-3) #[bg=${beige}] %d/%m %H:%M:%S " + +setw -g window-status-current-style "bg=${orange} bold" +setw -g window-status-current-format "#[fg=${dark_blue}] #I#[fg=${black}]:#[fg=${white}]#W#[fg=${blue}]#F " + +setw -g window-status-style "fg=${light_blue} bg=${blue}" +setw -g window-status-format " #I#[fg=${light_blue}]:#[fg=${light_blue}]#W#[fg=${light_blue}]#F " setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'