-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_tmux.conf
89 lines (68 loc) · 2.49 KB
/
dot_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
# mh tmux conf
## uncomment to remap ^a to ^b (prevents conflict with shell: go to beginning of line)
unbind C-a
set -g prefix C-b
## bind 'r' to reload tmux config
unbind r
bind r source-file ~/.tmux.conf
## bind ^T to toggle-panes (not working..)
#unbind ^T
#bind ^T select-pane -t :.+
## remap split window keys to H (horizontal) and V (veritcal)
bind h split-window -v
bind v split-window -h
## kill window/pane
bind k confirm kill-window
## bind n (next) and p (previous) windows
unbind n
bind n next-window
unbind p
bind p previous-window
# mouse disabld as it prevents copying from tmux easily
# down side is that scroll wheel and clicking are also disabled
set -g mouse on
# 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
# enable vi mode keys
set-window-option -g mode-keys vi
# New method (https://github.com/tmux/tmux/issues/754)
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
#bind -t vi-copy 'y' copy-selection
# set default terminal mode to xterm-256 to support PS1 colors
set -g default-terminal "xterm-256color"
# set default terminal mode to 256 colors
#set -g default-terminal "screen-255color"
# fix pbcopy/pbpaste
if 'command -v reattach-to-user-namespace >/dev/null' \
'set -gq @osx-pasteboard true'
if 'tmux show -gv @osx-clipboard' \
'set -g default-command "reattach-to-user-namespace -l $SHELL"'
# present a menu of URLs to open from the visible pane. sweet.
bind-key u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\
split-window -l 10 "urlview /tmp/tmux-buffer"
## shorten command delay
set -sg escape-time 1
## start with window & pane 1 (instead of 0)
set -g base-index 1
set -g pane-base-index 1
## List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'dracula/tmux'
set -g @dracula-plugins "cpu-usage ram-usage time"
set -g @dracula-military-time true
set -g @dracula-show-powerline true
set -g @dracula-show-left-icon session
set -g @dracula-show-flags true
## Other methods for loading plugins:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
## Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'