aboutsummaryrefslogtreecommitdiff
path: root/tmux/.tmux.conf
blob: 8fec4b2a9c1f1e0e5d0057fd56987c037b16229c (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Keybindings
setw -g mode-keys vi
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R
bind-key M-k resize-pane -U 5
bind-key M-j resize-pane -D 5
bind-key M-h resize-pane -L 5
bind-key M-l resize-pane -R 5
bind 'v' copy-mode


unbind '"'
unbind %
bind-key "\\" split-window -h -c "#{pane_current_path}"
bind-key "|" split-window -fh -c "#{pane_current_path}"
bind-key "-" split-window -v -c "#{pane_current_path}"
bind-key "_" split-window -fv -c "#{pane_current_path}"

unbind c
bind c new-window -c "#{pane_current_path}"

unbind r
bind r source-file $HOME/.tmux.conf

set -g prefix C-s

# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1

# renumber windows sequentially after closing any of them
set -g renumber-windows on

# remove administrative debris (session name, hostname, time) in status bar
set -g status-left ''
set -g status-right ''

# increase scrollback lines
set -g history-limit 50000

# don't suspend-client
unbind-key C-z


# Style

# Dark grey background
set -g default-terminal "screen-256color"
set -ag terminal-overrides ",xterm-256color:Tc"

# Pane border
set -g pane-border-style fg=cyan
set -g pane-active-border-style fg=green

# Status bar  
set -g status-style bg=black,fg=yellow
set -g window-status-style fg=green,bold

# Message/input 
set -g message-style bg=black,fg=white

# Pane text
set -g pane-border-style fg=white


# Plugins
set-environment -g TMUX_PLUGIN_MANAGER_PATH $XDG_DATA_HOME/tmux/plugins/

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'

set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-sessionist'

# restore: neovim session, automatic
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'

run $XDG_DATA_HOME'/tmux/plugins/tpm/tpm'
run-shell $XDG_DATA_HOME'/tmux/plugins/tmux-continuum/continuum.tmux'
run-shell $XDG_DATA_HOME'/tmux/plugins/tmux-sessionist/sessionist.tmux'
run-shell $XDG_DATA_HOME'/tmux/plugins/tmux-resurrect/resurrect.tmux'