over-env/etc/tmux.conf
2022-08-18 22:01:15 +02:00

96 lines
3.7 KiB
Bash

# ┌──────────────┐
# │ Key bindings │
# └──────────────┘
# prefix = Ctrl+A, Ctrl+A a to send it literally (like screen)
unbind C-b
set-option -g prefix C-a
bind a send-prefix
# Shift+S to type into all panes at once
bind-key S set-window-option synchronize-panes
# prefix then / for vertical split, - for horizontal
unbind-key %
unbind-key '"'
unbind-key /
unbind-key -
bind-key / split-window -h
bind-key - split-window -v
# ┌─────────────┐
# │ Misc config │
# └─────────────┘
# mouse (scrolling, selection)
set-option -g mouse on
# I got room!
set-option -g history-limit 100000
# rename windows using escape sequences
set-window-option -g automatic-rename off
set-option -g allow-rename on
# so pagers don't blank the screen
set-option -g alternate-screen off
# True color
set-option -ga terminal-overrides ",xterm-256color: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 │
# └──────────────────────────────────────────────────────┘
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)
set-option -g status-justify "left"
set-option -g status-left-style none
set-option -g status-left-length "80"
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] %Y-%m-%d %H:%M #[bg=colour248,fg=colour237] #S "
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] "