# unbind default prefix unbind C-b # set prefix to ctrl-a set -g prefix C-a # dont mess up with other ctrl-a options by pressing ctrl-a twice bind C-a send-prefix # use mouse to scroll set -g mouse on # set clipboard on set-option -g set-clipboard external # vim mode and copy keybindings # enable vi mode setw -g mode-keys vi # list keybindings: tmux list-keys -T copy-mode-vi # remap copy paste keys unbind [ bind y copy-mode unbind p bind p paste-buffer bind-key -T copy-mode-vi 'v' send -X begin-selection bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'wl-copy' bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'wl-copy' bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'wl-copy' bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle bind-key -T copy-mode-vi 'Y' send-keys -X copy-pipe-and-cancel "tmux paste-buffer" bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" bind-key -T copy-mode-vi MouseDown3Pane select-pane # right mouse button (to highlight sutff) bind-key -T copy-mode-vi MouseDrag3Pane select-pane \; send-keys -X begin-selection unbind-key -T copy-mode-vi MouseDragEnd3Pane # set zsh as default shell set -g default-command /bin/zsh set -g default-shell /bin/zsh set -sg escape-time 1 set -g base-index 1 setw -g pane-base-index 1 set -s default-terminal tmux-256color set -s terminal-overrides '' set -as terminal-overrides ',*:Tc' set-option -g xterm-keys on # reload config bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." set -g history-limit 10000 # vim style spliting bind-key v split-window -h bind-key s split-window -v # pane movement similar to vim bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R # resize pane bind -r H resize-pane -L 5 bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 # styling set -g status-style bg='#000000' set -g status-style fg='#ffffff' # toggles status bar bind-key -r S set-option -g status # don't rename windows automatically set-option -g allow-rename off # maximum length of the left component of the status line to 20 set -g status-left-length 20