-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtmux.conf_jh
106 lines (79 loc) · 2.98 KB
/
tmux.conf_jh
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
###########################################
#.tmux_conf #
#Junhyeok Ahn ( [email protected] ) #
###########################################
#################
#Session Option #
#################
#Change bind key to ctrl-a
unbind-key C-b
set-option -g prefix C-a
#Index start from 0
set -g base-index 1
#Renumber windows when it is closed
set-option -g renumber-windows on
#History
set -g history-limit 10240
#Repeat time limit (ms)
set-option -g repeat-time 500
#256-color terminal
set-option -g default-terminal "screen-256color"
#Sierra
#set-option -g default-command "reattach-to-user-namespace -l bash"
#Add truecolor support (tmux info | grep Tc)
#set-option -g terminal-overrides ",xterm-256color:Tc"
set-option -ga terminal-overrides ",xterm-255color:Tc"
#Key binding in the status line
set -g status-keys vi
#Mouse
setw -g mouse on
################
#Window Option #
################
#Copy-mode
setw -g mode-keys vi
#Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#No delay for escape key press
set -sg escape-time 0
##############
#Key Binding #
##############
#Pane Split
bind-key v split-window -h
bind-key s split-window -v
#Pane Resize
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
#Pane Move
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#Reload tmux config
bind r source-file ~/.tmux.conf \; display-message "Reloaded!"
#Copy-mode
#bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
#Capture pane and open in Vim
bind-key C-t run 'tmux capture-pane -S -102400 -p > /tmp/tmux-capture.txt'\;\
new-window "reattach-to-user-namespace view /tmp/tmux-capture.txt"
bind-key C-c run "screencapture -l$(osascript -e 'tell app \"iTerm\" to id of window 1') -x -o -P /tmp/$(date +%Y%m%d-%H%M%S).png"
#Clear scrollback buffer
bind-key C-l send-keys C-l \; clear-history
#############
#Decoration #
#############
set -g status-justify left
set-option -g status-left '#[bg=colour72] #[bg=colour237] #[bg=colour236] #[bg=colour235]#[fg=colour185] #h #[bg=colour236] '
set-option -g status-left-length 16
set-option -g status-bg colour237
set-option -g status-right '#[bg=colour236] #[bg=colour235]#[fg=colour185] #(date "+%a %b %d %H:%M") #[bg=colour236] #[bg=colour237] #[bg=colour72] '
set-option -g status-interval 60
set-option -g pane-active-border-fg colour240
set-option -g pane-border-fg colour238
set-window-option -g window-status-format '#[bg=colour238]#[fg=colour107] #I #[bg=colour239]#[fg=colour110] #[bg=colour240]#W#[bg=colour239]#[fg=colour195]#F#[bg=colour238] '
set-window-option -g window-status-current-format '#[bg=colour236]#[fg=colour215] #I #[bg=colour235]#[fg=colour167] #[bg=colour234]#W#[bg=colour235]#[fg=colour195]#F#[bg=colour236] '