-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
104 lines (86 loc) · 2.61 KB
/
tmux.conf
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
92
93
94
95
96
97
98
99
100
101
102
103
104
# Configuration
# improve colors
set -g default-terminal "screen-256color"
# setw -g utf8 on
# set -g status-utf8 on
set -g history-limit 5000
setw -g mode-keys vi
setw -g mouse off
set -sg escape-time 1
set -g repeat-time 1000
set-option -g base-index 1
set-option -g focus-events on
set-option -sa terminal-overrides ',XXX:RGB'
set-window-option -g pane-base-index 1
set -g renumber-windows on
# Activity monitoring
setw -g monitor-activity on
# set -g window-status-activity-style 'fg=colour247,blink'
# Key Bindings
unbind-key C-b
set -g prefix C-a
bind-key C-a send-prefix
# Clear screen
# bind-key C-l send-keys "clear && tmux clear-history" \; send-keys "Enter"
# bind -n C-k clear-history
bind-key C-l send-keys -R \; clear-history \; send-keys "Enter"
# Copy and paste like in vim
# unbind-key [
bind Escape copy-mode
# bind-key -n ^v copy-mode
# bind-key C-A send-prefix
# bind-key -t vi-copy v begin-selection
# bind-key -t vi-copy y copy-selection
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
unbind-key p
bind-key p paste-buffer
# sessions
bind-key ^ switch-client -l
bind-key c-s choose-tree
# split windows like vim. - Note: vim's definition of a horizontal/vertical split is reversed from tmux's
unbind-key '"'
unbind-key %
# unbind-key s
bind-key s split-window -v
bind-key S split-window -v -l 40
bind-key v split-window -h
bind-key V split-window -h -l 120
unbind-key n
bind-key c-n next-window
bind-key c-p last-window
# navigate panes with hjkl
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# unbind-key ';'
bind-key p last-pane
bind-key -r H resize-pane -L 10
bind-key -r J resize-pane -D 10
bind-key -r K resize-pane -U 10
bind-key -r L resize-pane -R 10
bind-key -r D swap-pane -D
bind-key -r U swap-pane -U
unbind-key r
bind-key r source-file ~/.tmux.conf \; display "Configuration Reloaded!"
bind-key c-q killp
# unbind-key d
# bind-key ^d detach-client
# Local config for osx
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf'
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
# Plugins
# https://github.com/tmux-plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @open-S 'https://www.google.com/search?q='
# Style
if-shell "[ -f ~/.tmux-style.conf ]" 'source ~/.tmux-style.conf'
run '~/.tmux/plugins/tpm/tpm'