-
Notifications
You must be signed in to change notification settings - Fork 6
/
tmux.conf
100 lines (78 loc) · 3.07 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
unbind C-b
set -g prefix C-a
bind C-a last-window
bind a send-prefix
# If tmux can't infer UTF8 capability, you might need to start it with -u
#set -g utf8 on
# Fancier status bar (needs 256-colour terminal support)
set -g status on
set -g status-bg colour235
set -g status-fg white
set -g status-left '#[fg=cyan]#H '
#set -g status-right '#[fg=colour246]#(cat /proc/loadavg | cut -d" " -f1-3 | sed "s/ /, /g") #[fg=yellow]#(cat /sys/class/power_supply/BAT0/capacity)% #[fg=green]#(date "+%b %d %H:%M")'
set -g status-right '#[fg=colour246]#(cat /proc/loadavg | cut -d" " -f1-3 | sed "s/ /, /g") '
set -g status-left-length 20
set -g status-right-length 40
# Highlight active window
set-window-option -g window-status-current-style bg=colour88
# The default is 500ms, which makes mode-switching in Vim very slow.
set -sg escape-time 0
# Allow apps to use smcup/rmcup terminal capabilities so the screen content
# is preserved before/after an app runs.
#set-window-option -g alternate-screen off
# My emulator shows gibberish when copying text, so don't bother with
# clipboard setting - I can do that with ^A-v
set-option -g set-clipboard off
# Enable italics
set -g default-terminal "tmux-256color"
# Just click it
set -g mouse on
# Vim-like movements
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Quick pane resizing
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# Make new window/pane commands inherit the CWD
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Sometimes I lapse into my i3 shortcuts
bind _ split-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
# Break/Join panes
bind + break-pane
bind / command-prompt -p "send pane to:" "join-pane -t '%%'"
# Toggle broadcast mode, where input is sent to all panes at once
bind b set-window-option synchronize-panes
# Copying
bind [ copy-mode
unbind -T copy-mode-vi Enter
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "exec wl-copy"
bind -T copy-mode-vi Escape send-keys -X cancel
# Copy a tmux buffer into the clipboard
#bind v save-buffer ~/.tmux-buffer \; run-shell "xsel -i -b <~/.tmux-buffer && rm -f ~/.tmux-buffer"
#bind v save-buffer ~/.tmux-buffer \; run-shell "wl-copy <~/.tmux-buffer && rm -f ~/.tmux-buffer"
# Set terminal titles to something useful
set -g set-titles on
set -g set-titles-string "#I:#W - #T"
# Causes tmux to resize a window based on the smallest client actually
# viewing it, not on the smallest one attached to the entire session.
setw -g aggressive-resize on
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'Morantron/tmux-fingers'
# Other examples:
# github_username/plugin_name \
# [email protected]/user/plugin \
# [email protected]/user/plugin \
# initializes TMUX plugin manager
run -b '~/.tmux/plugins/tpm/tpm'