-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
141 lines (109 loc) · 4.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
set-option -g default-terminal "screen-256color"
# use C-a, since it's on the home row and easier to hit than C-b
set -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# set history scrollback lines
set -g history-limit 100000
# vi is good
setw -g mode-keys vi
# mouse behavior
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
bind-key : command-prompt
bind-key r refresh-client
bind-key L clear-history
bind-key space next-window
bind-key bspace previous-window
bind-key enter next-layout
# use vim-like keys for splits and windows
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Have splits open in the current directory
bind s split-window -c '#{pane_current_path}'
bind v split-window -c '#{pane_current_path}' -h
# Faster escape sequences (default is 500ms).
# This helps when exiting insert mode in Vim: http://superuser.com/a/252717/65504
set -s escape-time 50
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key C-o rotate-window
bind-key + select-layout main-horizontal
bind-key = select-layout main-vertical
setw -g other-pane-height 25
setw -g other-pane-width 80
bind-key a last-pane
bind-key q display-panes
bind-key c new-window
bind-key t next-window
bind-key T previous-window
bind-key [ copy-mode
bind-key ] paste-buffer
# Resizing splits
bind-key -n C-Up resize-pane -U 5
bind-key -n C-Down resize-pane -D 5
bind-key -n C-Left resize-pane -L 5
bind-key -n C-Right resize-pane -R 5
# bind-key -t vi-copy v begin-selection
# bind-key -t vi-copy y copy-pipe "/usr/bin/xclip -i -selection clipboard"
# bind-key -t vi-copy y copy-pipe "clip.exe"
# unbind -t vi-copy Enter
# bind-key -t vi-copy Enter copy-pipe "/usr/bin/xclip -i -selection clipboard"
# bind-key -t vi-copy Enter copy-pipe "clip.exe"
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send -X begin-selection
# bind-key -T copy-mode-vi y send -X copy-pipe "/usr/bin/xclip -i -selection clipboard"
bind-key -T copy-mode-vi y send -X copy-pipe "clip.exe"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
# bind-key -T copy-mode-vi Enter send -X copy-pipe "/usr/bin/xclip -i -selection clipboard"
bind-key -T copy-mode-vi Enter send -X copy-pipe "clip.exe"
#set -g status on # turn the status bar on
#set -g status-utf8 on # set utf-8 for the status bar
#set -g status-interval 1 # set update frequencey (default 15 seconds)
#set -g status-justify left # center window list for clarity
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# set color for status bar
set -g status-style bg=default #base02
set -ga status-style fg=colour3 #yellow
set -ga status-style dim
# default window title colors
setw -g window-status-style fg=brightblue #base0
set -g pane-border-style fg=colour15
set -g pane-active-border-style fg=colour10
set -g status-right-length 0
set -g status-right ""
#--------------------------------------------
#(shell-command) First line of the command's output
#[attributes] Colour or attribute change
#H Hostname
#F window flag
#I Current window index
#P Current pane index
#S Session name
#T title
#W window name
## A literal "#"
set -g set-titles on
set -g set-titles-string '#W'
set -g status-position top
set -g status-left '#[fg=colour254,bg=colour234,nobold]'
set -g window-status-format "#[fg=colour242,bg=colour236] #I #[fg=colour242,bold]#W #[fg=colour31,bg=colour236,nobold]"
set -g window-status-current-format "#[fg=colour2,bg=colour236] #I #[fg=colour231,bold]#W #[fg=colour31,bg=colour236,nobold]"
set -g window-status-separator " "
set -g repeat-time 0
set -g renumber-windows on
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"