-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
121 lines (92 loc) · 3.54 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
# to source this file from somewhere else
# source ~/dotfiles/.tmux.conf
# Inform programs of 256 colour support.
# set -g default-terminal "xterm-256color"
set -g default-terminal "screen-256color"
set -g default-shell $SHELL
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
set-option -g display-time 2000
set -g escape-time 10
# fix for cursor shape does not change
# @see https://github.com/neovim/neovim/wiki/FAQ#cursor-shape-doesnt-change-in-tmux
# set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
set -ga terminal-overrides ",xterm-256color:Tc"
# enable clipboard in copy mode in conjunction to iTerm
set -g set-clipboard on
# 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
# ctrl-a instead of ctrl-b as standard prefix
unbind-key C-b
set -g prefix C-Space
bind-key C-Space send-prefix
# fix: hitting esc key in vim has a delay
set -s escape-time 0
# make window/pane index start with 1
set -g base-index 1
setw -g pane-base-index 1
bind-key r source-file ~/.tmux.conf \; display "tmux.conf reloaded!"
# quickly open a new window
bind-key N new-window
bind-key C-b last-window
# split window and fix path for tmux 1.9
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
# pane movement shortcuts
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Resize pane shortcuts
bind-key -r H resize-pane -L 10
bind-key -r J resize-pane -D 10
bind-key -r K resize-pane -U 10
bind-key -r L resize-pane -R 10
# enable mouse support for switching panes/windows
setw -g mouse on
# different key for copy mode
bind-key Escape copy-mode
# vim keys for copy
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
# =======================================================================
# Status bar settings
# =======================================================================
# Set status position
set-option -g status-position bottom
# Set the base index for windows and panes to 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# Renumber when window is closed
set -g renumber-windows on
# Activity monitoring
setw -g monitor-activity on
# Status settings
set -g status on
# Update the status bar every few seconds
set -g status-interval 15
set -g status-justify centre
# basic color
set -g status-bg colour234
set -g status-fg colour137
# Status line left side
set -g status-left-length 70
set -g @online_icon "yes"
set -g @offline_icon "no"
#set -g status-left "#[fg=brightblue] Session: #S | Host: #H"
set -g status-left "#[fg=colour233,bg=colour247,bold] Session #S "
# Status line right side
set -g status-right-length 70
set -g status-right "#[fg=colour233,bg=colour247,bold] %d %b %R "
# =======================================================================
# Plugins settings
# =======================================================================
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sessionist' # session helpers prexif + C (new session)
set -g @plugin 'tmux-plugins/tmux-resurrect' # prefix + C-s save, C-r restore
set -g @plugin 'tmux-plugins/tmux-yank'
# set -g @plugin 'KeitaNakamura/neodark.vim' # neodark theme
# Initialize plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'