-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
82 lines (68 loc) · 2.26 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
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
#bind-key C-a send-prefix
set -g prefix C-a
# Start windows and panes at 1
set -g base-index 1
setw -g pane-base-index 1
set-option -g renumber-windows on
# Nested tmux
#setw -g window-status-current-bg colour40
bind -n C-t new-window -a
bind -n S-left prev
bind -n S-right next
bind -n S-C-left swap-window -t -1
bind -n S-C-right swap-window -t +1
bind-key L command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S - ; save-buffer %1 ; delete-buffer'
bind -n M-F11 set -qg status-bg colour25
bind -n M-F12 set -qg status-bg colour40
bind -n S-up \
send-keys M-F12 \; \
set -qg status-bg colour25 \; \
unbind -n S-left \; \
unbind -n S-right \; \
unbind -n S-C-left \; \
unbind -n S-C-right \; \
unbind -n C-t \; \
set -qg prefix C-b
bind -n S-down \
send-keys M-F11 \; \
set -qg status-bg colour40 \; \
bind -n C-left prev \; \
bind -n C-right next \; \
bind -n S-C-left swap-window -t -1 \; \
bind -n S-C-right swap-window -t +1 \; \
bind -n C-t new-window -a -c "#{pane_current_path}" \; \
set -qg prefix C-a
# split panes using | and -
bind | split-window -h
bind - split-window -v
# reload config file
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
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
# don't rename windows automatically
set-option -g allow-rename off
# enable mouse mode
set -g mouse on
# Plugin Configs
set -g status-left-length 20
set -g status-right '#{prefix_highlight} #{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %Y-%m-%d %H:%M'
set -g history-limit 50000
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
#set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-cpu'
# Install TMUX plugin manager if needed
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'