-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
111 lines (88 loc) · 3.02 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
# Oh, well. Once you get used to one configuration,
# you won't change it in your lifetime.
# Change the default prefix.
# My preference is C-p.
set-option -g prefix C-p
unbind-key C-b
bind-key C-p send-prefix
set-window-option -g mode-keys vi
#
# Status Bar
#
# Put status bar at top
set-option -g status-position bottom
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Make the window list aligned to:
set -g status-justify left
# Careful that some options stop working for 2.8 and higher.
# Change any -bg -fg to -style, and use extra fg= and bg=.
#
# Ref:
# 1. https://github.com/tmux/tmux/issues/1689
# 2. https://github.com/tmux/tmux/wiki/FAQ#how-do-i-translate--fg--bg-and--attr-options-into--style-options
# Window list color:
# For < 2.8
#set-window-option -g window-status-bg white
#set-window-option -g window-status-fg black
# For >= 2.8
set-window-option -g window-status-style fg=black,bg=white
# Highlight *active window*
# For < 2.8
#set-window-option -g window-status-current-bg white
#set-window-option -g window-status-current-fg red
# For >= 2.8
set-window-option -g window-status-current-style fg=red,bg=white
# Highlight *active panel*
# For < 2.8
#set-option -g pane-active-border-fg colour1
# For >= 2.8
set-option -g pane-active-border-style fg=colour1
# Other things in status bar:
set -g status-fg white
set -g status-bg colour2
set -g status-left-length 60
set -g status-left "[CPU:#{cpu_percentage}] %H:%M:%S %m/%d/%Y #{host} "
set -g status-left-style fg=black,bg=colour2
set -g status-right "#{prefix_highlight}"
#
# Cooked keys
#
# Shortcut for the sync-panes
# Need to press C-p first
bind-key C-i setw synchronize-panes on
bind-key C-o setw synchronize-panes off
# Use Alt-arrow keys without prefix key to switch panes
# For my Mac, the M maps to ESC even if Meta-key is turned on
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
# Use PREFIX+r to reload config
bind r source-file ~/.tmux.conf \; display "Configuration reloaded."
# Use vi-copy mode
# set-window-option -g mode-keys vi
set-option -g mouse on
#
# TPM Plugin
# Requirements: tmux version 1.9 (or higher)
# Check https://github.com/tmux-plugins/tpm
#
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-cpu'
#set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# XXX
# For powerline
# Theme file: ~/.local/lib/python3.8/site-packages/powerline/config_files/themes/tmux/default.json
#source ~/.local/lib/python3.8/site-packages/powerline/bindings/tmux/powerline.conf
set -g default-terminal "xterm-256color"