-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
114 lines (93 loc) · 3.19 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
# Set prefix key to c-f instead of defaul c-b
unbind C-b
set -g prefix C-u
bind C-q send-prefix
# toogle last window by hitting again C-f
#bind-key C-a last-window
# Start windows and pane numbering with index 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# re-number windows when one is closed
set -g renumber-windows on
# highlight window when it has new activity
setw -g monitor-activity off
set -g visual-activity off
# Show times longer than supposed
set -g display-panes-time 2000
# {n}vim compability
# set -g default-terminal "tmux-256color"
# set -ga terminal-overrides ",tmux-256color:Tc"
# set -g default-terminal "xterm-256color"
# set-option -g default-terminal "screen-256color"
# Split horiziontal and vertical splits, instead of % and "
# bind-key v split-window -h -c '#{pane_current_path}'
# bind-key s split-window -v -c '#{pane_current_path}'
bind _ split-window -h
bind - split-window -v
# Pressing Ctrl+Shift+Left (will move the current window to the left. Similarly
# right. No need to use the modifier (C-b).
# bind-key -n C-S-Left swap-window -t -1
# bind-key -n C-S-Right swap-window -t +1
# Source file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Use emacs keybindings in copy mode
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# setw -g mode-keys emacs
# set -g status-keys emacs
# Faster command sequence
# set -s escape-time 0
# Have a very large history
set -g history-limit 1000000
# Mouse mode off
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g mouse on
# Set title
set -g set-titles on
set -g set-titles-string "#T"
# Equally resize all panes
bind-key = select-layout even-horizontal
bind-key | select-layout even-vertical
# Resize panes
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
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Disable confirm before killing
# bind-key x kill-pane
# disable M-a C-z to suspend tmux
unbind-key C-z
# disable C-d to exit shell, this C-d happens when being first input to prompt
unbind-key C-d
# set update frequencey (default 15 seconds)
# set -g status-interval 1
# color
## tab
# setw -g window-status-format "#[bg=colour141]#[fg=colour189] #W "
# setw -g window-status-current-format "#[fg=colour54,bold]#[bg=colour225] *#W "
# setw -g window-status-content-attr bold,blink,reverse
## status bar
# set-option -g status-position botton
# set-option -g status-justify left
# set -g status-fg white
# set -g status-bg colour141
# set -g status-left '#[fg=colour54,bold]#[bg=colour225] #S '
# set -g status-right-length 60
# set -g status-right '#[fg=colour54,bold]#[bg=colour225] %Y-%m-%d %H:%M '
set -g status-bg black
set -g status-fg white
# set -g window-status-current-bg white
# set -g window-status-current-fg black
# set -g window-status-current-attr bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
# window switching with page up/down
bind-key -n S-Left previous-window
bind-key -n S-Right next-window