forked from acornejo/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
108 lines (84 loc) · 2.81 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
# change the prefix key
set-option -g prefix C-space
bind-key C-space send-prefix
# choose session
bind S choose-session
# create new window, use current path
bind c new-window -c "#{pane_current_path}"
# vim mode keys
setw -g mode-keys vi
# vim-like split window
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
# vim-like pane selection
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind h if-shell "$is_vim" "send-keys C-w h" "select-pane -L"
bind j if-shell "$is_vim" "send-keys C-w j" "select-pane -D"
bind k if-shell "$is_vim" "send-keys C-w k" "select-pane -U"
bind l if-shell "$is_vim" "send-keys C-w l" "select-pane -R"
# vim-like pane resizing
bind -r C-H resize-pane -L 5
bind -r C-J resize-pane -D 5
bind -r C-K resize-pane -U 5
bind -r C-L resize-pane -R 5
# vim-like window reoordering
bind -r C-p swap-window -t -1
bind -r C-n swap-window -t +1
# vim-like copy & paste
bind -t vi-copy v begin-selection
bind -t vi-copy C-c clear-selection
bind -t vi-copy Space page-down
bind -t vi-copy C-v rectangle-toggle
bind -t vi-copy C-a start-of-line
bind -t vi-copy C-e end-of-line
bind -t vi-copy y copy-selection
# enable mouse to select panes
# setw -g mode-mouse on
# set-option -g mouse-select-pane on
# do not wait for escape sequences
set -s escape-time 0
# set history size
set -g history-limit 50000
# show messages for 4 seconds
set -g display-time 4000
# enable focus events for terminal
set -g focus-events on
# use readline bindings in command mode (:)
set -g status-keys emacs
# start windows and panes at 1
set -g base-index 1
set -g pane-base-index 1
# renumber windows to avoid gaps
set-option -g renumber-windows on
# disable copy to clipboard extension, which causes garbage on terminals
set-option -s set-clipboard off
# Change the way windows are sized
setw -g aggressive-resize on
# Monitor window activity
set -g monitor-activity off
set -g visual-activity off
# Screen lock
set-option -g lock-after-time 0
set-option -g lock-command "bashlock"
# allow window titles
set -g set-titles on
set -g set-titles-string ' #I:#W'
# setw -g automatic-rename on
# set terminal for colors
set -g default-terminal "screen-256color"
# Status Theme
set -g status-bg default
set -g status-fg white
set -g status-right-length 60
set -g status-right '#[bg=colour172,fg=brightwhite,bold] #T #[bg=green,fg=white,bold] #(echo $USER)@#h #[reverse] %b %d %I:%M %p '
set -g status-left-length 0
set -g status-left ''
# Window List Theme
setw -g window-status-format " #I #W#F "
setw -g window-status-current-format " #I #[reverse] #W#F "
setw -g window-status-fg blue
setw -g window-status-bg white
setw -g window-status-bell-fg red
setw -g window-status-bell-bg white
setw -g window-status-activity-fg cyan
setw -g window-status-activity-bg white