-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
83 lines (65 loc) · 2.33 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
set -g default-shell "/bin/bash"
set -g default-terminal "screen-256color"
set -g terminal-overrides 'xterm:colors=256'
set -g terminal-overrides 'screen:colors=256'
set -g terminal-overrides 'screen-256color:colors=256'
set -g xterm-keys on
#set-window-option -g xterm-keys on
# Block auto renaming of windows
set-option -g allow-rename off
set-window-option -g mode-keys emacs
# Use C-a (like in screen) instead of C-b
set-option -g prefix C-a
bind-key a send-prefix
# Use C-a C-a to return to previous window (like in screen)
bind-key C-a last-window
bind-key b previous-window
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Set status bar
set -g status-interval 2
set -g status-bg white
set -g status-fg black
# No session name on the left
set -g status-left ""
# Show uptime on the right
set -g status-right "#[fg=blue]\"#H\" #[fg=green,bg=black]#(tmux-mem-cpu-load --colors --interval 2)#[default] %H:%M %d.%m.%y"
set -g status-right-length 200
# Highlight active window
set-window-option -g window-status-current-style bg=black
set-window-option -g window-status-current-style fg=green
# Toggle mouse on with ^A m
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off with ^A M
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
# Create a separate full-screen console, duplicating the current one
unbind +
bind + \
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
swap-pane -s tmux-zoom.0 \;\
select-window -t tmux-zoom
# Kill created console (to use with the previous bind)
unbind -
bind - \
last-window \;\
swap-pane -s tmux-zoom.0 \;\
kill-window -t tmux-zoom
# Remove delay
set -sg escape-time 0
# Remove SSH_AUTH_SOCK to disable tmux automatically resetting the variable
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID \
SSH_CONNECTION WINDOWID XAUTHORITY"
# Use a symlink to look up SSH authentication
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock