feat(tmux): improve status line with more info & colors

This commit is contained in:
Fernando Schauenburg 2020-12-11 18:03:22 +01:00
parent 2409726b84
commit e601612535
2 changed files with 51 additions and 21 deletions

View file

@ -1,16 +1,55 @@
# Default to solarized dark. set -g status-left-length 32
set -g status-fg colour3 # Yellow set -g status-right-length 32
set -g status-bg colour0 # Base02 set -g status-justify centre
# Color definitions
# SOLARIZED TMUX
# --------- --------
# Base03 colour8
# Base02 colour0
# Base01 colour10
# Base00 colour11
# Base0 colour12
# Base1 colour14
# Base2 colour7
# Base3 colour15
# Yellow colour3
# Orange colour9
# Red colour1
# Magenta colour5
# Violet colour13
# Blue colour4
# Cyan colour6
# Green colour2
set -g status-left "\
#[fg=colour3]#{session_name} #{?client_prefix,#[fg=colour1],#[fg=colour10]}> \
#[fg=colour2]#{window_index} #{window_name} #{?client_prefix,#[fg=colour1],#[fg=colour10]}> \
#[fg=colour6]#{pane_index} #{pane_current_command} #{?client_prefix,#[fg=colour1],#[fg=colour10]} "
set -g status-right "\
#[fg=colour6]C #{client_pid} #{?client_prefix,#[fg=colour1],#[fg=colour10]}< \
#[fg=colour2]S #{pid} #{?client_prefix,#[fg=colour1],#[fg=colour10]}< \
#[fg=colour3]%b %d %H:%M "
setw -g window-status-current-format " #{?client_prefix,#[fg=colour1],}#{window_index}:#{window_name}#{window_flags} "
setw -g window-status-format " #{window_index}:#{window_name}#{window_flags} "
%if #{==:#{BACKGROUND},dark}
set -g status-style bg=colour0 # ... on Base02
setw -g window-status-style fg=colour12,bg=default # Base0 on Transparent setw -g window-status-style fg=colour12,bg=default # Base0 on Transparent
setw -g window-status-current-style fg=colour9,bg=default # Orange on Transparent setw -g window-status-current-style fg=colour4,bg=default # Blue on Transparent
set -g pane-border-style fg=colour0 # Base02 set -g pane-border-style fg=colour0 # Base02
set -g pane-active-border-style fg=colour14 # Base1 set -g pane-active-border-style fg=colour14 # Base1
set -g message-style fg=colour0,bg=colour14
%if #{==:#{BACKGROUND},light} set -g message-command-style fg=colour0,bg=colour14
set -g status-fg colour13 # Violet %elif #{==:#{BACKGROUND},light}
set -g status-bg colour7 # Base2 set -g status-style fg=colour13,bg=colour7 # Violet on Base2
setw -g window-status-style fg=colour11,bg=default # Base00 on Transparent setw -g window-status-style fg=colour11,bg=default # Base00 on Transparent
setw -g window-status-current-style fg=colour5,bg=default # Magenta on Transparent setw -g window-status-current-style fg=colour4,bg=default # Blue on Transparent
set -g pane-border-style fg=colour7 # Base2 set -g pane-border-style fg=colour7 # Base2
set -g pane-active-border-style fg=colour10 # Base01 set -g pane-active-border-style fg=colour10 # Base01
set -g message-style fg=colour7,bg=colour10
set -g message-command-style fg=colour7,bg=colour10
%endif %endif

View file

@ -38,22 +38,13 @@ setw -g automatic-rename on # automatically rename windows
setw -g mouse on # enable mouse support setw -g mouse on # enable mouse support
setw -g pane-base-index 1 # start pane numbering from 1 setw -g pane-base-index 1 # start pane numbering from 1
#
# Status bar
#
set -g status-left-length 32
set -g status-right-length 32
set -g status-justify centre
set -g status-left '@#h §#S' # @host §session
set -g status-right '%Y-%m-%d %H:%M' # date time
# The shell will increment SHLVL by one when it is started -> unsetting this # The shell will increment SHLVL by one when it is started -> unsetting this
# variable here removes any memory of nesting before tmux was executed and will # variable here removes any memory of nesting before tmux was executed and will
# cause shells to start with level 1 again within the session. # cause shells to start with level 1 again within the session.
set-environment -gu SHLVL set-environment -gu SHLVL
# #
# Colors # Style (status list, colors, ...)
# #
source-file -q "$XDG_CONFIG_HOME/tmux/tmux-colors.conf" source-file -q "$XDG_CONFIG_HOME/tmux/tmux-colors.conf"