-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
72 lines (56 loc) · 2.46 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
## Tmux Configuration
# Version-specific commands [grumble, grumble]
# See: https://github.com/tmux/tmux/blob/master/CHANGES
run-shell 'tmux setenv -g TMUX_VERSION $(tmux -V | \
sed -En "s/^tmux[^0-9]*([.0-9]+).*/\1/p")'
# Change prefix key to <space>
unbind-key C-a
unbind-key C-b
unbind-key C-Space
set-option -g prefix C-Space # first prefix
# Setting terminal colors
# set -ga terminal-overrides ",screen-256color:Tc"
# set -g default-terminal "screen-256color"
set-option -g terminal-overrides ',xterm-256color:RGB'
# Use xterm keycodes for Shift-F1 etc (for Vim).
set-window-option -g xterm-keys on
# Re-number windows when one is closed
set -g renumber-windows on
# Set ability to capture on start and restore on exit window data when running
# an application.
setw -g alternate-screen on
# Automatic rename enabled by default.
setw -g automatic-rename on
# Start windows and panes at 1, not 0.
set -g base-index 1
setw -g pane-base-index 1
# Use vim keybindings in copy mode or choice mode
set-window-option -g mode-keys vi
# Edit configuration and reload
bind C-e new-window -n 'tmux.conf' "sh -c '\${EDITOR:-vim} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"Config reloaded\"'"
bind c new-window -c "#{pane_current_path}"
bind g split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind p previous-window
bind n next-window
# setup mouse
if-shell -b "[[ `tmux -V | awk '{print ($2 >= 2.1)}'` -eq 1 ]]" "set -g mouse on" "set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on"
# Avoid creating login shells inside tmux
set -g default-command "${SHELL}"
# Install tpm if not already installed
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'tmux-plugins/tmux-copycat'
# set -g @plugin 'tmux-plugins/tmux-logging'
# set -g @plugin 'odedlaz/tmux-onedark-theme'
# set -g @plugin "egel/tmux-gruvbox"
# set -g @plugin 'tonylambiris/palenight-tmux'
# set -g @plugin 'dmitry-kabanov/tmux-statusline-themes'
set -g @plugin 'srcery-colors/srcery-tmux'
set -g @srcery_tmux_patched_font '1'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'RyanMillerC/better-vim-tmux-resizer'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'