summaryrefslogtreecommitdiff
path: root/src/.tmux.conf
blob: 6302a094fbddcce604e6f00e5ed344466e1df240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Basic settings
set -g default-terminal "screen-256color"
set -as terminal-overrides ",*:Tc"
set -g mouse on
setw -g mode-keys vi
set -g status on
set -g history-limit 10000
set -g terminal-overrides ',*:Tc'


set-option -g display-panes-time 100  # milliseconds
set-option -g repeat-time 50  # in milliseconds, default is 500
set-option -s escape-time 10  # default 500ms, lower = faster key recognition


# Pass through bracketed paste
bind-key ] run-shell "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"

# Swap window
bind-key -n M-a swap-window -t -1\; previous-window
bind-key -n M-s swap-window -t +1\; next-window

# Move
bind-key -n M-q previous-window
bind-key -n M-w next-window


# Explicitly enable bracketed paste in terminals that support it
set-option -ga terminal-features ',xterm*:clipboard,bpaste'

# force bracketed-paste for modern terminals:
set -as terminal-overrides ',*:Ss=\E[%p1%d;%;%p2%ds,Se=\E[2u'

# Load theme from ~/.tmux/themes/selected.theme
if-shell 'test -f ~/.tmux/themes/selected.theme' "source-file ~/.tmux/themes/selected.theme"

# Fallback if no theme is selected
if-shell 'test ! -f ~/.tmux/themes/selected.theme' "display-message 'No theme selected. Create ~/.tmux/themes/selected.theme'"