-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
78 lines (64 loc) · 2.89 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
# REF: https://github.com/guesslin/dotfiles/blob/master/config/tmux.conf
# REF: https://github.com/pastleo/dotSetting/blob/master/home/.tmux.conf
# We can use tmux list-keys to see all the settings
# General Options
set-option -g base-index 0
set-option -g renumber-windows off
set-option -g status-interval 1
# Scroll back n lines
set-option -g history-limit 5000
# set tmux send default-terminal as screen-256color for support 256-colros display
set-option -g default-terminal screen-256color
# status-line
set-option -g status-style bg=colour235,fg=colour75
set-option -g status-justify centre
set-option -g status-position bottom
# status-left-line
set-option -g status-left-style fg=colour147,bg=default
# user name : session name : current windows : current pane
set-option -g status-left "[ #[fg=green]#(echo $USER)#[default] : #[fg=colour161]#{=10:session_name}#[fg=default] : #[fg=blue]#I#[default] : #[fg=yellow]#P#[default] ]"
set-option -g status-left-length 40
# status-right-line
set-option -g status-right-style fg=colour13,bright
#set-option -g status-right "[ #[fg=colour46]凛の魅力に溺死しろ #[fg=default]%Y-%m-%d %H:%M ]"
set-option -g status-right-length 40
# window-status general option
set-window-option -g pane-base-index 0
set-window-option -g monitor-activity on
set-window-option -g clock-mode-style 24
set-window-option -g clock-mode-colour colour184
set-window-option -g window-status-separator " "
# window-status
set-window-option -g window-status-style fg=colour99
set-window-option -g window-status-format "(#I:#W#F)"
# window-status-current
set-window-option -g window-status-current-style bg=colour237,fg=colour168
set-window-option -g window-status-current-format "(#I:#W#F)"
# window-status-activity
set-window-option -g window-status-activity-style fg=yellow,blink
# Mouse mode
set-option -g mouse on
# Avoid jump after mouse selection
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X end-selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X end-selection
# Copy mode
# Use vi-style contrls in copy mode
set-window-option -g mode-keys vi
# Use v to select
bind-key -T copy-mode-vi v send -X begin-selection
# Use y to copy
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -selection clipboard > /dev/null"
# Key remap
# Reload tmux settings
bind-key r source-file ~/.tmux.conf
# Copy function (Use y instead)
# bind-key -n C-s run "tmux save-buffer - | xclip -selection clipboard > /dev/null" \; display-message "Copied"
# Paste function (Use C-S-v instead)
# bind-key -n C-v run-shell "tmux set-buffer \"$(xclip -selection clipboard -o)\"; tmux paste-buffer" \; display-message "Pasted"
# Fix delay for ESC in vim
# https://vi.stackexchange.com/a/30801
set -sg escape-time 10
# Always create new window with the current path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"