-
Notifications
You must be signed in to change notification settings - Fork 16
/
.tmux.conf
116 lines (85 loc) · 3.28 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
# Settings ========================================================================================
# fix for vim background colors
set -g default-terminal 'screen-256color'
set -ga terminal-overrides ',screen-256color:Tc'
set-option -ga terminal-overrides ",xterm-256color:Tc"
# decrease delay to increase vim responsiveness
set -sg escape-time 1
# increase repeat time for repeatable commands
set -g repeat-time 1000
# refresh status line every 5 seconds
set -g status-interval 5
# start window and pane indices at 1.
set -g base-index 1
set -g pane-base-index 1
set -g default-terminal screen-256color
set -g history-limit 10000
set -g status-keys vi
setw -g mode-keys vi
setw -g monitor-activity on
# prevent unwanted exit with Ctrl-d
set-environment -g 'IGNOREEOF' 2
# automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
set-window-option -g clock-mode-style 24
# refresh status line every 5 seconds
set -g status-interval 5
# length of tmux status line
set -g status-left-length 30
set -g status-right-length 150
# Theme ===========================================================================================
# make active pane border blue
#set -g pane-border-fg colour7
#set -g pane-active-border-fg colour7
# set the background color
set -g status-bg colour7
set -g status-fg colour0
#set -g window-status-current-bg colour250
#set -g window-status-current-fg colour0
# remove space between window titles
set -g window-status-separator ''
# set the left and right status
set -g status-left '#{?client_prefix,#[bg=colour2],#[bg=colour7]}#[fg=colour0] #S #[bg=colour7]#{?client_prefix,#[fg=colour2],#[fg=colour0]}'
set -g status-right '#[bg=colour7]#[fg=colour0]#{?window_zoomed_flag, #[bg=colour250]#[fg=colour0] ❐ #[bg=colour7]#[fg=colour0],} %b %d %H:%M '
# customize how windows are displayed in the status line
set -g window-status-current-format " #I:#W "
set -g window-status-format " #I:#W "
# Bindings ========================================================================================
# set the prefix to `ctrl+a` instead of `ctrl+b`
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# use | and - to split a window vertically and horizontally instead of " and % respoectively
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# use r to quickly reload tmux settings
unbind r
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config'
# toggle synchronized input to all panes in current window
bind-key S set-window-option synchronize-panes
# move around panes with hjkl, as one would in vim after pressing ctrl + w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes with HJKL
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
# use Alt-vim keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window