nixrice/misc/dot-config/tmux/tmux.conf
2024-02-25 23:58:49 -05:00

30 lines
939 B
Bash

set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# Change tmux prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
set -g mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on
# For newer versions of tmux:
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; #send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
set -g status-style 'bg=#333333 fg=#5eacd3'
# Vim-like visual mode and yanking
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Vim-like pane switching
bind -r ^ last-window
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R