-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
122 lines (100 loc) · 4.4 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
## Plugin-specific settings
set -g @continuum-restore 'on'
set -g @resurrect-save 'w'
set -g @resurrect-restore 'R'
set -g @resurrect-processes '"~yarn start->nvm use && yarn start"'
#set -g @resurrect-strategy-nvim 'session'
#set -g @resurrect-save-shell-history 'on'
#set -g @resurrect-capture-pane-contents 'on'
# Allows for faster key repetition
set -s escape-time 0
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Allow scrolling
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# Remove SSH_AUTH_SOCK to disable auto-resetting of Tmux 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_soc
# Colors!
set -g default-terminal "screen-256color"
# Set default shell
set -g default-shell $SHELL
# Increase the command history buffer
set-option -g history-limit 10000
## Appearance
# Automatically set window title
set-window-option -g automatic-rename off
set-option -g allow-rename off
set-option -g set-titles on
# Sounds
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# Modes & Highlighted Text
setw -g clock-mode-colour colour135
setw -g mode-style bg=yellow,fg=black,none
# Panes
set -g pane-border-style bg=default,fg=colour247
set -g pane-border-status top
set -g pane-border-format " #[fg=blue]#{pane_index}. #[fg=colour255]#{pane_current_command} "
set -g pane-active-border-style bg=default,fg=colour107,bold
# Status Bar
set -g status on
set -g status-justify left
set -g status-interval 2
set -g status-position bottom
set -g status-style bg=colour234,fg=colour137,dim
set -g status-left ' '
set -g status-right ' #[fg=colour244,bg=colour234] #U@#H #[fg=colour231,bg=colour241] #S #[fg=colour223,bg=colour239] %Y-%m-%d #[fg=colour152]%l:%M:%S %p '
set -g status-right-length 75
set -g status-left-length 20
setw -g window-status-current-style bg=colour238,fg=colour81,bold
setw -g window-status-current-format '#[fg=colour234][ #[fg=colour81]#I#[fg=blue]:#[fg=colour255]#W#[fg=green]#F #[fg=colour234]]'
setw -g window-status-style bg=colour235,fg=colour138,none
setw -g window-status-format '#[fg=colour238][ #[fg=colour138]#I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F #[fg=colour238]]'
setw -g window-status-bell-style bg=colour1,fg=colour255,bold
# Constrain window size to max window size rather than session max size
setw -g aggressive-resize off
# Messages
set -g message-style bg=colour109,fg=colour236,bold
set -g message-command-style bg=black,fg=blue
## Keybindings
unbind C-b
set -g prefix C-a
bind-key C-a last-window
# Split panes by | and -
bind '\' split-window -h -c '#{pane_current_path}' # Split panes horizontally
bind - split-window -v -c '#{pane_current_path}' # Split panes vertically
# vim-style pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key 0 run "tmux split-window -l 12 'bash -ci ftpane'"
# Force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
## Plugins
set -g @plugin 'tmux-plugins/tpm' # Plugin manager
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect' # Storing/restoring tmux sessions
set -g @plugin 'tmux-plugins/tmux-continuum' # Automatic restore
set -g @plugin 'tmux-plugins/tmux-sessionist' # Session management/switching
set -g @plugin 'tmux-plugins/tmux-yank' # Enable copy/paste
# set -g @plugin 'tmux-plugins/tmux-copycat' # Copy and search the terminal output
set -g @plugin 'tmux-plugins/tmux-pain-control' # Pane resizing
set -g @plugin 'soyuka/tmux-current-pane-hostname' # Display hostname
# run-shell "powerline-daemon -q"
# source "/usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
# Installs TPM if it hasn't been installed already
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'