dotfiles/.tmux.conf

44 lines
1.4 KiB
Text
Raw Normal View History

2020-09-14 10:18:35 +02:00
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
# 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
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel primary > /dev/null"
# Middle click to paste from the clipboard
unbind-key MouseDown2Pane
2021-01-04 17:53:44 +01:00
bind-key -n MouseDown2Pane run "tmux set-buffer \"$(wl-copy --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'