This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
115 lines (87 loc) · 3.15 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
start-server
# Global settings
#
set-option -g escape-time 0
set-option -g history-limit 900000
set-option -g status-keys vi
set-option -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY COLORFGBG"
set-option -g visual-bell off
# r to reload conf
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# vi-style controls for copy mode
set-window-option -g mode-keys vi
# Set window notifications
set-window-option -g monitor-activity off
set -g visual-activity off
# set aggressive resizing
setw -g aggressive-resize on
# listen for activity on all windows
#set -g bell-action any
#set -g bell-action none
# tell tmux to use 256 colour terminal
# set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# run this so we can copy and paste
set-option -g default-command "reattach-to-user-namespace -l zsh"
# statusbar
# set-option -g status-utf8 on
set-option -g status-interval 5
set-option -g status-justify left
set-option -g status-left-length 15
set-option -g status-left ' #h | '
set-option -g status-right-length 60
set-option -g status-right ' | Network: #{online_status} | CPU: #{cpu_percentage} | #{battery_icon} #{battery_percentage} | %a %h-%d %l:%M %p #[default]'
# binding
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# copy/paste mode should be more vi like
unbind [
bind [ previous-window
unbind ]
bind ] next-window
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind | split-window -h
bind _ split-window -v
# split pane, using key next to ! which is break pane
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# disallow rename, so the window name will be persistent
set-option -g allow-rename off
# colors
source ~/.tmux/jake.tmuxcolors
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# restore after reboot, resurrect
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
# helpers for statusbar
set -g @plugin 'tmux-plugins/tmux-cpu'
# battery status for status bar
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @batt_charged_icon "☀️ "
set -g @batt_charging_icon "⛅️ "
set -g @batt_discharging_icon "🌧 "
set -g @batt_attached_icon "🌨 "
# network status for status bar
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @online_icon "✓"
set -g @offline_icon "✗"
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'