tmux: Updated config

This commit is contained in:
Christian Baer 2024-06-20 09:19:24 +02:00
parent a0209264b5
commit 4b0d5b21fd
3 changed files with 20 additions and 38 deletions

View File

@ -10,9 +10,9 @@ bind-key C-a send-prefix
# Use C-b to send prefix twice so it acts on nested session
bind-key -n C-b send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
# split panes using # and -
bind "#" split-window -h
bind "-" split-window -v
unbind '"'
unbind %
@ -32,13 +32,6 @@ set -g pane-base-index 1
# Enable mouse mode
set -g mouse on
#+----------------+
#+ Plugin Support +
#+----------------+
#+--- tmux-prefix-highlight ---+
set -g @prefix_highlight_fg black
set -g @prefix_highlight_bg brightcyan
#+---------+
#+ Options +
#+---------+
@ -59,8 +52,8 @@ set -g status-fg white
#+-------+
#+ Panes +
#+-------+
set -g pane-border-style bg=black,fg=black
set -g pane-active-border-style bg=black,fg=brightblack
set -g pane-border-style bg=black,fg=brightblack
set -g pane-active-border-style bg=black,fg=magenta
set -g display-panes-colour black
set -g display-panes-active-colour brightblack
@ -82,19 +75,25 @@ set -g message-command-style fg=cyan,bg=brightblack
## Status bar design
# status line
set -g status-justify left
set -g status-interval 2
set -g status-interval 1
set -g default-terminal "screen-256color"
# Add true color & italics support with alacritty terminal
if-shell 'type "alacritty" >/dev/null' \
'set -g default-terminal "alacritty"'
#+--- Bars ---+
set -g status-left "#[fg=black,bg=blue,bold] #S "
set -g status-right "#{prefix_highlight}#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]|#[fg=white,bg=brightblack] %H:%M#[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore] #[fg=black,bg=cyan,bold] #h "
set -g status-left ''
## Indicate if prefix has been pressed
set -ga status-left '#[bg=#white]#[fg=#brightblack]#{?client_prefix,#[fg=red] ⭘ , ⭘ }'
## Session name
set -ga status-left "#S "
set -g status-right ''
# Date and time
set -ga status-right "#[fg=white,bg=brightblack] %Y-%m-%d |#[fg=white,bg=brightblack] %H:%M"
# Hostname
set -ga status-right "#[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore] #[fg=black,bg=blue,bold] #h "
#+--- Windows ---+
set -g window-status-format " #[fg=white,bg=brightblack] #I #[fg=white,bg=brightblack]#W #F "
set -g window-status-current-format " #[fg=black,bg=cyan] #I#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F "
set -g window-status-current-format " #[fg=black,bg=cyan] #I #[fg=black,bg=cyan]#W #F "
set -g window-status-separator ""

View File

@ -1,12 +0,0 @@
#+--- Colors ---+
set -g status-bg brightblack
set -g status-fg white
#+--- Bars ---+
set -g status-left "#[fg=black,bg=green,bold] #S "
set -g status-right "#{prefix_highlight}#[fg=white,bg=red,bold] #h "
#+--- Windows ---+
set -g window-status-format " #[fg=white,bg=black] #I #[fg=white,bg=black]#W #F "
set -g window-status-current-format " #[fg=white,bg=red] #I#[fg=white,bg=red,nobold,noitalics,nounderscore] #[fg=white,bg=red]#W #F "
set -g window-status-separator ""

View File

@ -35,11 +35,6 @@ for ((i=1; i <= $#fpath; ++i)); do
done
)
## If tmux session is nested, source modified config (e.g. for overwriting styles)
if [[ "${SSH_CONNECTION}" ]] && [[ "${TMUX}" ]]; then
tmux source-file $XDG_CONFIG_HOME/tmux/tmux.nested.conf
fi
## Update or install vim plugins
#vim -i NONE +PlugUpdate +PlugClean! +qal