-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
106 lines (81 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
# use C-a for prefix
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
set -g default-terminal "screen-256color"
# set base index for windows to 1 instead of 0
set -g base-index 1
# set base index for panes to 1 instead of 0
setw -g pane-base-index 1
# increase history limit
set-option -g history-limit 5000
# reduce escape time to make apps more responsive
set -s escape-time 1
# reload the file with prefix-r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# split windows more easily
bind | split-window -h
bind - split-window -v
# remap movement keys to vim mappings
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# left hand side status info
set -g status-left "[#S]"
set -g status-left-length 20
# centre the window list
set -g status-justify centre
# show load, memory stats in status bar
set -g status-interval 5
set -g status-right "#[fg=blue,bg=black]#(acpi -b | sed s/'Battery 0: '//) #[fg=white,bg=black]| #[fg=green,bg=black]#(~/bin/tmux-mem-cpu-load --interval 5) #[fg=white,bg=black]| #[fg=yellow,bg=black]#(date +'%Y-%m-%d %H:%M')#[default]"
set -g status-right-length 110
# monitor activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# cycle through windows
unbind ^A
bind ^A select-window -t :+
# use vi keys for moving around, copying and pasting
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
# C-a a should pass C-a through to the shell
bind-key a send-prefix
# colours for status bar
set -g status-fg white
set -g status-bg black
# colours for messaging
set -g message-style fg=white
set -g message-style bg=black
set -g message-style bright
# colour styles for regular windows
setw -g window-status-style fg=cyan
setw -g window-status-style bg=default
setw -g window-status-style bright
# colour styles for active windows
setw -g window-status-current-style fg=green
setw -g window-status-current-style bg=default
setw -g window-status-current-style bright
# colour styles for windows with activity alerts
setw -g window-status-activity-style fg=white
setw -g window-status-activity-style bg=blue
setw -g window-status-activity-style bright
# resize the currently focused pane via C-a C-<direction>
bind-key ^h resize-pane -L
bind-key ^j resize-pane -D
bind-key ^k resize-pane -U
bind-key ^l resize-pane -R
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-capture-pane-contents 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'