-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
69 lines (53 loc) · 2.15 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
###########################
# Configuration
###########################
# Remap prefix key to §
unbind C-b
set -g prefix §
bind § send-prefix
# Start window at 1 since 0 is too far away
set -g base-index 1
# Increase scroll-back history
set -g history-limit 5000
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf\; display-message "~/.tmux.conf reloaded"
# open with current path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "~/Sites"
# Re-number windows when one is closed
set -g renumber-windows on
# Enable scrolling and copy with mouse (prefix + ] to paste)
set -g mouse on
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" "send-keys 'C-h'" "select-pane '-L'"
bind-key -n 'C-j' if-shell "$is_vim" "send-keys 'C-j'" "select-pane '-D'"
bind-key -n 'C-k' if-shell "$is_vim" "send-keys 'C-k'" "select-pane '-U'"
bind-key -n 'C-l' if-shell "$is_vim" "send-keys 'C-l'" "select-pane '-R'"
bind-key -n 'C-\' if-shell "$is_vim" "send-keys 'C-\\'" "'select-pane '-l'"
bind-key -T copy-mode-vi 'C-h' select-pane '-L'
bind-key -T copy-mode-vi 'C-j' select-pane '-D'
bind-key -T copy-mode-vi 'C-k' select-pane '-U'
bind-key -T copy-mode-vi 'C-l' select-pane '-R'
bind-key -T copy-mode-vi 'C-\' select-pane '-l'
###########################
# Theme
###########################
source-file ~/.tmux-themes/dark.conf
###########################
# Status bar
###########################
set-window-option -g status-right ""
set -g window-status-format '#I:#(cd "#{pane_current_path}"; basename `git rev-parse --show-toplevel 2>/dev/null || pwd`)#F'
set -g window-status-current-format '#I:#(cd "#{pane_current_path}"; basename `git rev-parse --show-toplevel 2>/dev/null || pwd`)#F'
# center window list for clarity
set -g status-justify centre
###########################
# Plugins
###########################
set -g @plugin 'tmux-plugins/tpm'
run -b '~/.tmux/plugins/tpm/tpm'