-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
92 lines (70 loc) · 2.72 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
# Make tmux's command key like screen.
set-option -g prefix C-a
unbind-key C-b
bind-key a send-prefix # C-a a sends literal 'C-a'
bind-key C-n next-window
bind-key C-p previous-window
bind-key k select-pane -U
bind-key C-k select-pane -U
bind-key j select-pane -D
bind-key C-j select-pane -D
bind-key Escape copy-mode
bind-key Tab last-window
bind-key C-a select-pane -t :.+
bind-key A command-prompt "rename-window %%"
# Start windows from 1, 0 is the far end of the keyboard
set-option -g base-index 1
# Alternate screen is annoying.
set-window-option -g alternate-screen on
bind-key / command-prompt "find-window %1"
# Resize only the focused window to the smallest client, not the entire session
set-window-option -g aggressive-resize on
# Disable all mouse selection stuff, this hijacks the mouse cursor to prevent
# iterm/terminator etc selecting.
# set-window-option -g mode-mouse off
# Don't set the window name, I'll be doing it.
set-window-option -g automatic-rename off
set-option -g set-titles on
set-option -g set-titles-string '#S'
set-option -g status on # status bar
set-option -g bell-action any
set-option -g visual-bell off # visual bells are worse
# Increase scrollback buffer
set-option -g history-limit 10000
# Use 256 colours
set-option -g default-terminal 'screen-256color'
# Use UTF-8
#set-option -g utf8 on set-window-option -g utf8 on
# Stop the statusbar being fluorescent green
set-option -g status-bg default
set-option -g status-fg white
set-window-option -g window-status-current-fg blue
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bold
set-window-option -g window-status-current-format '« #I:#W »'
set-option -g status-right-length 50
set-option -g status-left-length 50
set-option -g status-left "#[fg=yellow]#h:[#S] "
set-option -g status-right "#[fg=yellow]%a %d-%h %H:%M"
# Make active border red, it defaults to green which isn't very subtle
set-option -g pane-border-fg white
set-option -g pane-active-border-fg red
# Don't forget the environment, SSH_AGENT etc
set -g update-environment -r
# Use xterm keys so Ctrl-Left etc work
set-window-option -g xterm-keys on
# Stop the delay sending Escape to Vim
set-option -g escape-time 0
# Easy reload without restarting tmux
bind-key r source-file ~/.tmux.conf \; display-message "Config reloaded!"
# Restore additional processes with tmux-resurrect
set -g @resurrect-processes 'weechat dstat vmstat tmux screen ssh mosh mutt nvim'
# Tmux Plugin Manager
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/sensible \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-sessionist \
tmux-plugins/tmux-battery \
"
run-shell ~/.tmux/plugins/tpm/tpm