forked from junhyeokahn/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux_update.conf
140 lines (108 loc) · 4.05 KB
/
tmux_update.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
##################################################################
# .tmux_conf #
# Originally created by Junhyeok Ahn ([email protected] ) #
# Modified by Minkyu Kim([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 -ga terminal-overrides ",xterm-256color:Tc"
# Key binding in the status line
set -g status-keys vi
# Mouse
setw -g mouse on
#set -g mouse on
#setw -g mode-mouse on
#set -g mouse-select-window on
#set -g mouse-select-pane on
#set -g mouse-resize-pane on
#set -g mouse-utf on
#set -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
set-window-option -g xterm-keys 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!"
#use Alt-vim keys without prefix key to switch panes
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
# 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
# Shifht arrow keys ithout prefix key to switch panes
bind -n S-Left previous-window
bind -n S-Right next-window
bind -n M-Left previous-window
bind -n M-Right next-window
bind -n M-h previous-window
bind -n M-l next-window
# Copy-mode
#bind-key -T vi-copy v begin-selection
#bind-key -T vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
#unbind -T vi-copy Enter
#bind-key -T vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
#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] '