cleanup and theme tmux.conf

This commit is contained in:
Martin Sekera 2023-05-08 17:27:51 +02:00
parent 60477fd896
commit 5bc8c16f98

View file

@ -1,3 +1,55 @@
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ Uncomment the colors you like ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
# T0B = status bar background
# T1* = inactive tab, pane borders, hostname and clock,
# inactive window number
# T2* = active tab, bell flag, active window number
# TS* = sync-attr colors
# TZ* = zoom-attr colors
# shared flags
TSF=colour201
TSB=colour095
TZF=colour047
TZB=colour028
# ━━━ gruvbox ━━━
#T0B=colour237
#T1F=colour223
#T1B=colour239
#T2F=colour239
#T2B=colour214
# ━━━ catppuccin macchiato (pick one T2B) ━━━
T0B="#24273a" # base
T1F="#b8c0e0" # subtext1
T1B="#363a4f" # surface0
T2F="#363a4f" # surface0
#T2B="#f4dbd6" # rosewater
#T2B="#f5bde6" # pink
T2B="#c6a0f6" # mauve
#T2B="#8aadf4" # blue
# ━━━ catppuccin mocha ━━━
#T0B="#1e1e2e" # base
#T1F="#bac2de" # subtext1
#T1B="#313244" # surface0
#T2F="#313244" # surface0
#T2B="#f5e0dc" # rosewater
#T2B="#f5c2e7" # pink
#T2B="#cba6f7" # mauve
#T2B="#89b4fa" # blue
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ End of color definitionss ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
# ┌──────────────┐
# │ Key bindings │
# └──────────────┘
@ -7,6 +59,9 @@ unbind C-b
set-option -g prefix C-a
bind a send-prefix
# reload config
bind r source-file "/etc/tmux.conf" \; display-message "config reloaded"
# Shift+S to type into all panes at once
bind-key S set-window-option synchronize-panes
@ -43,47 +98,12 @@ set-option -ga terminal-overrides ",xterm*:Tc"
# waiting for escape sequences introduces delays in vim/kak/hx
set-option -s escape-time 0
# ┌──────────────────────────────────────────────────────┐
# │ Gruvbox ^^ from https://github.com/egel/tmux-gruvbox
# └──────────────────────────────────────────────────────┘
# ╭───────────╮
# │ Statusbar
# ╰───────────╯
set-option -g status "on"
# default statusbar color
set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
# default window title colors
set-window-option -g window-status-style bg=colour239,fg=colour246 # bg=yellow, fg=bg1
# default window with an activity alert
set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3
# active window title colors
set-window-option -g window-status-current-style bg=red,fg=colour237 # fg=bg1
# pane border
set-option -g pane-border-lines heavy
set-option -g pane-border-indicators arrows
set-option -g pane-active-border-style fg=colour250 #fg2
set-option -g pane-border-style fg=colour237 #bg1
# message infos
set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
# writing commands inactive
set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
# pane number display
set-option -g display-panes-active-colour colour250 #fg2
set-option -g display-panes-colour colour237 #bg1
# clock
set-window-option -g clock-mode-colour colour109 #blue
# bell
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
# enable the statusbar and set some stuff
set-option -g status on
set-option -g status-justify "left"
set-option -g status-left-style none
set-option -g status-left-length "80"
@ -91,8 +111,32 @@ set-option -g status-right-style none
set-option -g status-right-length "80"
set-window-option -g window-status-separator ""
set-option -g status-left "#[bg=colour248,fg=colour237] #{=3:host_short} #[bg=colour237,fg=colour239] "
set-option -g status-right " #[bg=colour239,fg=colour246] %H:%M "
# statusbar background color
set-option -g status-style bg=$T0B
set-window-option -g window-status-current-format "#[bg=colour214,fg=colour239] #I #{p-10:#{s/ *\\(.*//:#{=10:window_name}}} #{?window_zoomed_flag,#[bg=colour028#,fg=colour040]Z,}#{?pane_synchronized,#[bg=colour201#,fg=colour016]S,}#[bg=colour237,fg=colour239] "
set-window-option -g window-status-format "#[bg=colour239,fg=colour223]#{?window_bell_flag,#[bg=colour214] #[bg=colour239], }#I #{p-10:#{s/ *\\(.*//:#{=10:window_name}}} #{?window_zoomed_flag,#[bg=colour028#,fg=colour040]Z,}#{?pane_synchronized,#[bg=colour055#,fg=colour201]S,}#[bg=colour237,fg=colour239] "
# shortened hostname on the left
set-option -g status-left "#[bg=$T1F,fg=$T1B] #{=3:host_short} #[bg=$T0B] "
# window list in the middle
set-window-option -g window-status-current-format "#[bg=$T2B,fg=$T2F] #I #{p-10:#{s/ *\\(.*//:#{=10:window_name}}} #{?window_zoomed_flag,#[bg=$TZB#,fg=$TZF]Z,}#{?pane_synchronized,#[bg=$TSB#,fg=$TSF]S,}#[bg=$T0B] "
set-window-option -g window-status-format "#[bg=$T1B,fg=$T1F]#{?window_bell_flag,#[bg=$T2B#,noreverse] , }#[bg=$T1B,fg=$T1F]#I #{p-10:#{s/ *\\(.*//:#{=10:window_name}}} #{?window_zoomed_flag,#[bg=$TZB#,fg=$TZF]Z,}#{?pane_synchronized,#[bg=$TSB#,fg=$TSF]S,}#[bg=$T0B] "
# clock on the right
set-option -g status-right " #[bg=$T1F,fg=$T1B] %H:%M "
# ╭────────────╮
# │ Misc stuff │
# ╰────────────╯
# pane borders
set-option -g pane-border-lines heavy
set-option -g pane-border-indicators arrows
set-option -g pane-active-border-style fg=$T1F
set-option -g pane-border-style fg=$T1B
# tmux messages
set-option -g message-style bg=$T2B,fg=$T2F
# pane numbers visible with ^A q
set-option -g display-panes-active-colour $T1F
set-option -g display-panes-colour $T2F