2022-03-08 11:12:09 +01:00
|
|
|
# remap prefix to Control + a
|
|
|
|
set -g prefix C-a
|
|
|
|
unbind C-b
|
|
|
|
bind C-a send-prefix
|
|
|
|
|
2022-03-09 01:15:44 +01:00
|
|
|
# More colors
|
|
|
|
set-option -g default-terminal "tmux-256color"
|
|
|
|
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
|
|
|
|
|
2022-03-08 11:12:09 +01:00
|
|
|
# force a reload of the config file (I don't think this works on nixos)
|
|
|
|
unbind r
|
|
|
|
bind r source-file ~/.tmux.conf
|
|
|
|
|
|
|
|
# quick pane cycling
|
|
|
|
unbind ^A
|
|
|
|
bind ^A select-pane -t :.+
|
|
|
|
|
|
|
|
# Vim-like keybinds for switching between panes
|
|
|
|
bind -n m-h select-pane -L
|
|
|
|
bind -n m-l select-pane -R
|
|
|
|
bind -n m-k select-pane -U
|
|
|
|
bind -n m-j select-pane -D
|
2022-03-08 22:26:20 +01:00
|
|
|
|
|
|
|
# Vim-mode
|
|
|
|
set-window-option -g mode-keys vi
|
|
|
|
|
|
|
|
# Vim like keybinds for copying
|
|
|
|
bind -t vi-copy v begin-selection # begin selection
|
|
|
|
bind -t vi-copy V rectangle-toggle # square selection (?)
|
|
|
|
|
|
|
|
bind -t vi-copy y copy-pipe 'xclip -in -set clipboard' # copy
|
|
|
|
|
|
|
|
unbind p
|
|
|
|
bind p run "tmux set-buffer \"$(xclip -o -set clipboard)\"; tmux paste-buffer" # paste
|
|
|
|
|
|
|
|
# Vim like mode for leaving insert mode
|
|
|
|
unbind [ # unbind the default way to copy text
|
|
|
|
bind Escape copy-mode # allow exiting insert mode with Escape
|
|
|
|
bind jj copy-mode # allow exiting insert mode with jj (?)
|