-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
171 lines (135 loc) · 6.06 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
# Config for tmux ge 2.1
set-option -g default-shell "/bin/bash"
# Automatically set window title
# set-window-option -g automatic-rename on
# set-option -g set-titles on
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
# USE IT IN LAB BUT NOT AT HOME!
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Set ability to capture on start and restore on exit window data when running an application
#setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
#set -s escape-time 50
# Vim-style pane selection
# Disabled: new plugin allows this with Ctrl+hjkl and works seamlessly for VIM and tmux!
# bind-key k select-pane -U
# bind-key j select-pane -D
# bind-key h select-pane -L
# bind-key l select-pane -R
# Use Alt-vim keys without prefix key to switch panes
# Disabled: new plugin allows this with Ctrl+hjkl and works seamlessly for VIM and tmux!
# bind -n M-h select-pane -L
# bind -n M-j select-pane -D
# bind -n M-k select-pane -U
# bind -n M-l select-pane -R
# # Use Alt-arrow keys without prefix key to switch panes
# 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
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Resize panes prefix+hjkl
bind-key -r h resize-pane -L 2
bind-key -r j resize-pane -D 2
bind-key -r k resize-pane -U 2
bind-key -r l resize-pane -R 2
# No delay for escape key press
set -sg escape-time 0
# scrollback history
set-option -g history-limit 99999
# Solarized
set -g default-terminal xterm-256color
set -ga terminal-overrides ",xterm-256color*:Tc"
# Reload tmux config
#bind r source-file ~/.tmux.conf
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key M split-window -h "nvim ~/.tmux.conf"
# Statusbar (bottom bar) additional information
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)'
set -g status-right '#[fg=cyan]#(hostname -s) #[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=colour239]%F #[fg=white]%H:%M#[default]'
# Alert if activity in windows
# setw -g monitor-activity on
############ THEME (Solarized dark) ############
# Statusbar (bottom bar): default colors
set-option -g status-bg black #base02
set-option -g status-fg yellow #yellow
#set-option -g status-style attr=default
#set -g window-status-current-attr bold
# Statusbar: highlight active window
set-window-option -g window-status-current-style fg=brightred #orange
set-window-option -g window-status-current-style bg=default
#set-window-option -g window-status-current-attr bright
# Statusbar: window title colors
set-window-option -g window-status-style fg=brightblue #base0
set-window-option -g window-status-style bg=default
#set-window-option -g window-status-attr dim
# Pane border color
# colour64 # green solarized
# colour136 # yellow solarized
# green # bright green
# colour240 # base01 solarized
# colour64 # green solarized
#
#set-option -g pane-border-fg black #base02
#set-option -g pane-active-border-fg brightgreen #base01
set -g pane-border-style fg=colour64 # yellow
set -g pane-active-border-style fg=colour136 # green
set -g pane-active-border-style bg=default
# Message text
set-option -g message-style bg=black #base02
set-option -g message-style fg=brightred #orange
# Pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
# Renumbering windows when one is closed
set-option -g renumber-windows on
# Clock
set-window-option -g clock-mode-colour green #green
# bell
#set-window-option -g window-status-bell-style fg=black,bg=red #base02, red
# Fix SSH agent forwarding.
# set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# set-environment -g SSH_AUTH_SOCK $HOME/.ssh/ssh-auth-sock.$HOSTNAME
# Copy these env variables to enable the ssh agent in tmux as well
# set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# Use vim style keys
set-window-option -g mode-keys vi
# ############
# ge 2.1
# ############
# rename-window ge21
# For 1.9 - Make new windows start in the same directory as the current window
unbind c; bind c new-window -c "#{pane_current_path}"
# Enable mouse interaction with windows, panes, etc
set -g mouse
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right
# USE IT IN LAB BUT NOT AT HOME!
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
# Set ability to capture on start and restore on exit window data when running an application
#setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
#set -s escape-time 50
# bell
set-window-option -g window-status-bell-style fg=brightblack,bg=red #base02, red
# -------------------
# Tmux Plugin Manager
# -------------------
# - install with prefix + I
# - update with prefix + U
# - uninstall removed plugins with prefix + alt + U
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator' # Vim-tmux navigation
set -g @plugin 'tmux-plugins/tmux-sensible' # Basic settings everyone agrees on
set -g @plugin 'tmux-plugins/tmux-cpu' # Show CPU usage in corner
set -g @plugin 'tmux-plugins/tmux-resurrect' # Dependency of tmux-continuum
set -g @plugin 'tmux-plugins/tmux-continuum' # Continuous save and restore of tmux env
set -g @plugin 'tmux-plugins/tmux-yank' # Access to system clipboard with prefix + y
set -g @plugin 'tmux-plugins/tmux-pain-control' # Tmux Pane navigation/split/resize --> replaced with better setting for me
set -g @continuum-restore 'on' # Automatically restore old tmux environment on startup
set -g focus-events on
# # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'