dotfiles/dot_tmux.conf

88 lines
2.7 KiB
Plaintext
Raw Normal View History

2023-02-11 14:11:00 +01:00
unbind C-b
set -g prefix C-a
bind C-a send-prefix
set -g base-index 1
set -ga terminal-overrides ",xterm-256color:Tc"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# Basic functions
bind -n M-n new-window
bind -n M-- split-window -v
bind -n M-| split-window -h
bind -n M-R command-prompt -I "" "rename-window '%%'"
bind -n M-X confirm-before "kill-window"
bind -n M-x confirm-before "kill-pane"
bind -n M-/ copy-mode
# ALT interface for switching windows
bind -n M-Tab last-window
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
# Linux system clipboard
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# enable vi mode
setw -g mode-keys vi
# don't allow tmux to rename the window based on commands running
set-option -wg automatic-rename off
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# increase scrollback buffer size
set -g history-limit 50000
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 5
# upgrade $TERM
set -g default-terminal "screen-256color"
# emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users
set -g status-keys emacs
# focus events enabled for terminals that support them
set -g focus-events on
# super useful when using "grouped sessions" and multi-monitor setup
setw -g aggressive-resize on
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
# status bar
set-option -g status-position top
set -g status-bg 'colour235'
set -g status-fg 'colour223'
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status 'on'
set -g status-right-length '100'
# set -g window-status-separator '|'
set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour222,bg=colour238] #W #[fg=colour8,bg=colour237] #(whoami) '
set -g status-right '#[fg=colour8,bg=colour237] %H:%M %a %d #[fg=colour222,bg=colour238] #h #[fg=colour232,bg=colour154] #{pomodoro_status} '
setw -g window-status-format '#[default] #I #W '
setw -g window-status-current-format '#[fg=colour222,bg=colour238] #I #W #F '
# List of plugins
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'olimorris/tmux-pomodoro-plus'
set -g @plugin "jlipps/tmux-safekill"
# Initialize TMUX plugin manager
run -b '~/.tmux/plugins/tpm/tpm'