-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
116 lines (90 loc) · 3.1 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
105
106
107
108
109
110
111
112
113
114
115
# Setting the prefix from C-b to C-a
# START:prefix
set -g prefix C-a
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
# END:unbind
#setting the delay between prefix and command
# START:delay
set -s escape-time 0
# END:delay
# Ensure that we can send Ctrl-A to other apps
# START:bind_prefix
bind C-a send-prefix
# END:bind_prefix
# Set the base index for windows to 1 instead of 0
# START:index
set -g base-index 1
# END:index
# Set the base index for panes to 1 instead of 0
# START:panes_index
setw -g pane-base-index 1
# END:panes_index
# splitting panes
# START:panesplit
# bind | split-window -h
# bind - split-window -v
# END:panesplit
# moving between panes
# START:paneselect
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# END:paneselect
# Pane resizing
# START:paneresize
bind-key M-h resize-pane -L
bind-key M-j resize-pane -D
bind-key M-k resize-pane -U
bind-key M-l resize-pane -R
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# END:paneresize
set -g status-interval 60
# set-option -g status off
# set-option -g status-left ""
# Fix the issue that bashrc/bash_profile is not loaded in tmux
# Force tmux to use login shell
set-option -g default-command "$SHELL --login"
if-shell "uname | grep -q Darwin" 'TMUX_THEME_COLOR_BG=colour012'
if-shell "uname | grep -q Darwin" 'TMUX_THEME_COLOR_FG=colour226'
if-shell "uname | grep -q Linux" 'TMUX_THEME_COLOR_BG=colour009'
if-shell "uname | grep -q Linux" 'TMUX_THEME_COLOR_FG=colour231'
if-shell "test -f ~/configurations/.tmux_theme" \
'source ~/configurations/.tmux_theme'
# Preview the favorite color theme by applying `favColorTheme` and add the one
# to `~/configurations/.tmux_theme` for using a customized theme color.
# This is a workaround to force read TMUX_THEME_COLOR_* settings.
if-shell "true" '\
set -g status-style fg=$TMUX_THEME_COLOR_FG,bg=$TMUX_THEME_COLOR_BG; \
set -g pane-border-style fg=$TMUX_THEME_COLOR_BG; \
set -g pane-active-border-style fg=$TMUX_THEME_COLOR_FG'
set -g default-terminal "screen-256color"
set -g history-limit 30000
# set-option -g mouse-select-pane on
# set-option -g mouse-select-window on
# set-window-option -g mode-mouse on
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
if-shell "~/configurations/utils/vtmuxLess24" \
'bind-key -t vi-copy v begin-selection' \
'bind-key -T copy-mode-vi v send-keys -X begin-selection'
if-shell "~/configurations/utils/vtmuxLess24" \
'unbind -t vi-copy Enter' \
'unbind-key -T copy-mode-vi Enter'
# 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'
# Auto-detect and install tpm if it does not exist.
if-shell "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'