-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtmux.conf
186 lines (130 loc) · 5.37 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Config reload
bind r source-file ~/.tmux.conf \; display "Tmux config updated"
# ----- Prefix -----
unbind-key C-b
set-option -g prefix C-x
bind-key C-x send-prefix
# ----- Panes -----
# Key bindings for switching panes
bind -n M-h select-pane -L # left
bind -n M-l select-pane -R # right
bind -n M-k select-pane -U # up
bind -n M-j select-pane -D # down
# Key bindings for creating panes
bind-key 1 split-window -h # horizontal
bind-key 2 split-window -v # verticle
# Seperator colors for current pane
set-option -g pane-active-border-style fg=blue # foreground
# set-option -g pane-active-border-style bg=white # background
# Seperator color for other panes
set-option -g pane-border-style fg=cyan # foreground
# set-option -g pane-border-style bg=white # background
# Key bindings for closing panes
bind-key 0 kill-pane
# Key bindings for adjusting panes size
bind-key K resize-pane -U # up
bind-key J resize-pane -D # down
bind-key L resize-pane -R # right
bind-key H resize-pane -L # left
bind-key m resize-pane -Z # maximize
# Key bindings for navigating between panes
bind-key k select-pane -U # up
bind-key j select-pane -D # down
bind-key l select-pane -R # right
bind-key h select-pane -L # left
# ----- Status Bar -----
# Colors for the status bar
set -g status-bg 'black' # background
set -g status-fg 'white' # foreground
# Contents on the right of the status bar
set -g status-right "#[fg=magenta,bold] #{prefix_highlight}#[fg=red,bold]CPU: #{cpu_percentage} #[fg=blue]Battery: #{battery_percentage} #[fg=green]%a %Y:%m:%d %H:%M:%S "
set -g status-interval 1 # refresh every second
set -g status-right-length 100 # maximum length for the right content of the status bar
# Contents on the left of the status bar
set -g status-left "#[fg=yellow,bold] ❐ #S " # show the current session
set -g status-left-length 8 # maximum length for the left content of the status bar
# Position of the status bar
# (top/bottom)
set -g status-position bottom
# Position of the window status
# (left/centre/right)
set -g status-justify left
# Color of the status bar message
# bg: background / fg: foreground
set-option -g message-style bg=blue,fg=white
# Key binding for toggle status bar
bind-key s set status
# ----- Windows -----
# Status format for the current window
setw -g window-status-current-format '#[fg=blue,bold]✔ #[fg=white,bold]#W'
# Status format for other windows
setw -g window-status-format '#[fg=white]#I #W'
# Seperator between each window names
set -wg window-status-separator ' '
# Show alert if other window changes?
setw -g monitor-activity off
# Should automatically rename other windows based on the current program?
set -g automatic-rename on
# Key binding for closing windows
bind-key q kill-window
# Key binding for switching windows
bind-key C-h previous-window
bind-key C-l next-window
# ----- More options -----
# History limit for scrolling back
set -g history-limit 5000
# Use mouse to switch windows, adjust panes, etc...
set -g mouse on
# True color support
# (True color support only shows effect if your terminal emulator supports true color)
set -g default-terminal xterm-256color
set-option -ga terminal-overrides ",*256col*:Tc"
# Delay after escape key is passed into the program
set -s escape-time 0
# Use vi styled keys for scrolling & copying
set-window-option -g mode-keys vi
# ----- Plugins -----
# Tmux plugin manager
# (REQUIRED FOR USING PLUGINS)
# (do not remove)
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Built-in plugins of p-z-l/magicTmux
# (recommended for better experience)
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# tmux-prefix_highlight configs
set -g @prefix_highlight_fg 'magenta' # default is 'colour231'
set -g @prefix_highlight_bg 'black' # default is 'colour04'
# Other plugins choices :
# (<prefix> + I to install/upgrade plugins, tmux will freeze for several seconds during install)
# Display online status on your status bar:
# set -g @plugin 'tmux-plugins/tmux-online-status'
# Restoring windows when starting tmux:
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# Easy logging and screen capturing for Tmux.
# set -g @plugin 'tmux-plugins/tmux-logging'
# A plugin that enhances tmux search:
# set -g @plugin 'tmux-plugins/tmux-copycat'
# Tmux key bindings for quick opening of a highlighted file or url:
# set -g @plugin 'tmux-plugins/tmux-open'
# Tmux plugin for copying to system clipboard. Works on OSX, Linux and Cygwin:
# set -g @plugin 'tmux-plugins/tmux-yank'
# Tmux plugin to monitor upload and download speed of one or all interfaces:
# set -g @plugin 'tmux-plugins/tmux-net-speed'
# Plugin that counts files on a specific mail directory
# set -g @plugin 'tmux-plugins/tmux-maildir-counter'
# A sidebar with the directory tree for the current path. Tries to make tmux more IDE like.
# set -g @plugin 'tmux-plugins/tmux-sidebar'
# Quickly open any url on your terminal window!
# set -g @plugin 'tmux-plugins/tmux-urlview'
# Quickly open any path on your temrinal window in your $EDITOR of choice!
# set -g @plugin 'jbnicolai/tmux-fpp'
# Lightweight tmux utils for manipulating sessions
# set -g @plugin 'tmux-plugins/tmux-sessionist'
# Initialize TMUX plugin manager
# (REQUIRED FOR USING PLUGINS)
# (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'