2020-09-14 10:18:35 +02:00
|
|
|
# List of plugins
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
2021-06-06 15:54:19 +02:00
|
|
|
set -g @plugin 'odedlaz/tmux-onedark-theme'
|
2021-06-06 16:42:41 +02:00
|
|
|
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
2021-06-06 15:54:19 +02:00
|
|
|
set -g @onedark_date_format "%d.%m.%y"
|
2020-09-14 10:18:35 +02:00
|
|
|
|
2021-06-06 16:01:57 +02:00
|
|
|
set -g default-terminal "tmux-256color"
|
|
|
|
set -ga terminal-overrides ",alacritty:Tc,*256col*:Tc"
|
|
|
|
|
2020-09-14 10:18:35 +02:00
|
|
|
# Scroll History
|
|
|
|
set -g history-limit 50000
|
|
|
|
|
|
|
|
# Make mouse useful, tmux > 2.1 include select, resize pane/window and console wheel scroll
|
|
|
|
set -g mouse on
|
|
|
|
|
|
|
|
# Lower escape timing from 500ms to 100ms for quicker response to scroll-buffer access.
|
|
|
|
set -s escape-time 100
|
|
|
|
|
|
|
|
# Selection with mouse should copy to clipboard right away, in addition to the default action.
|
|
|
|
unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
|
2021-06-06 16:42:41 +02:00
|
|
|
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | wl-copy --primary"
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
# Middle click to paste from the clipboard
|
|
|
|
unbind-key MouseDown2Pane
|
2021-06-06 16:42:41 +02:00
|
|
|
bind-key -n MouseDown2Pane run "tmux set-buffer \"$(wl-paste --primary)\"; tmux paste-buffer"
|
2020-09-14 10:18:35 +02:00
|
|
|
|
|
|
|
# Splitting
|
|
|
|
bind-key h split-window -h
|
|
|
|
bind-key v split-window -v
|
|
|
|
|
|
|
|
# Use Alt-arrow keys without prefix key to switch panes
|
|
|
|
bind -n M-Left select-pane -L
|
|
|
|
bind -n M-Right select-pane -R
|
|
|
|
bind -n M-Up select-pane -U
|
|
|
|
bind -n M-Down select-pane -D
|
|
|
|
|
|
|
|
# Resizing
|
|
|
|
bind-key M-j resize-pane -D
|
|
|
|
bind-key M-k resize-pane -U
|
|
|
|
bind-key M-h resize-pane -L
|
|
|
|
bind-key M-l resize-pane -R
|
|
|
|
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
|
|
run -b '~/.tmux/plugins/tpm/tpm'
|