From 4b0d5b21fdea0895aff9f2e686280d91555fe7ef Mon Sep 17 00:00:00 2001 From: Christian Baer Date: Thu, 20 Jun 2024 09:19:24 +0200 Subject: [PATCH] tmux: Updated config --- .config/tmux/tmux.conf | 41 +++++++++++++++++------------------ .config/tmux/tmux.nested.conf | 12 ---------- .config/zsh/.zlogin | 5 ----- 3 files changed, 20 insertions(+), 38 deletions(-) delete mode 100644 .config/tmux/tmux.nested.conf diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index c1acd23..c9528fa 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -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-separator "" +set -g window-status-current-format " #[fg=black,bg=cyan] #I #[fg=black,bg=cyan]#W #F " +set -g window-status-separator "" \ No newline at end of file diff --git a/.config/tmux/tmux.nested.conf b/.config/tmux/tmux.nested.conf deleted file mode 100644 index d6a1625..0000000 --- a/.config/tmux/tmux.nested.conf +++ /dev/null @@ -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 "" diff --git a/.config/zsh/.zlogin b/.config/zsh/.zlogin index 2465dfe..49a1f3a 100644 --- a/.config/zsh/.zlogin +++ b/.config/zsh/.zlogin @@ -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