forked from adkron/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtmux.conf.symlink
103 lines (84 loc) · 2.48 KB
/
tmux.conf.symlink
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
# shut off mouse
setw -g mode-mouse off
# center status
set -g status-justify centre
# turn on utf8
set -g status-utf8 on
# set color
set -g default-terminal "screen-256color"
# pass through fancy key combos (C-Arrows/S-Arrows)
set-window-option -g xterm-keys on
# minimize delay
set -sg escape-time 100
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf; display "Reloaded"
# quick pane cycling
bind -r b select-pane -t :.+
# The status bar itself.
set-window-option -g monitor-activity on
set-option -g status-left-length 60
set-option -g status-left "#[fg=black]#H #[fg=black]session:window.pane #[fg=black]#S:#I.#P"
set-option -g status-right-length 45
set-option -g status-right "%I:%M %p #[fg=yellow]#[fg=green]#(uptime | cut -d ',' -f 4-)"
# Maximize window
unbind UP
bind UP new-window -d -n tmux-zoom \; swap-pane -s tmux-zoom.1 \; select-window -t tmux-zoom
unbind DOWN
bind DOWN last-window \; swap-pane -s tmux-zoom.1 \; kill-window -t tmux-zoom
# vim movement
unbind LEFT
unbind RIGHT
bind -r h select-pane -L
bind -r C-h select-window -t :-
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind -r C-l select-window -t :+
# vim resizes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
set -g default-command /bin/bash
set -g default-shell /bin/bash
unbind %
unbind '"'
bind | split-window -h
bind _ split-window -v
bind -r - resize-pane -D
bind -r + resize-pane -U
bind -r < resize-pane -L
bind -r > resize-pane -R
# notifications
setw -g monitor-activity on
setw -g visual-activity on
# auto rename
set -g automatic-rename
# start window and pane numbering with 1 so left pane is left keyboard key
set -g base-index 1
setw -g pane-base-index 1
# open a man page in new pane or window
unbind m
unbind M
bind m command-prompt -p "man page:" "split-window -h 'exec man %%'"
bind M command-prompt -p "Man page:" "new-window -n 'man %1' 'exec man %1'"
# open a ssh in new pane or window
unbind s
unbind S
bind s command-prompt -p "user@server:" "split-window -h 'exec ssh %%'"
bind S command-prompt -p "user@server:" "new-window -n 'ssh %1' 'exec ssh %1'"
# vi-style controls in copy mode
set-option -g status-keys vi
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
unbind ]
bind p paste-buffer
# put next and previous to [ and ]
bind -r [ previous-window
bind -r ] next-window