-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
50 lines (36 loc) · 1.56 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
# change C-b -> C-t
unbind-key C-b
set-option -g prefix C-t
bind-key C-t send-prefix
# reset settings
bind r source-file ~/.tmux.conf \; display-message "tmux RELOADED!!"
set-option -g default-shell /bin/zsh
set-window-option -g mode-keys vi
# set-option -g default-terminal screen-256color
# esc
set -s escape-time 0
# tab番号を0からでなく1から
set-option -g base-index 1
set-option -g history-limit 10000
# tmux-powerline
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "left"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/dotfiles/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/dotfiles/tmux-powerline/powerline.sh right)"
# ref: https://stackoverflow.com/questions/35016458/how-to-write-if-statement-in-tmux-conf-to-set-different-options-for-different-t
# Version-specific commands [grumble, grumble]
# See: https://github.com/tmux/tmux/blob/master/CHANGES
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)"
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.1" | bc)" = 1 ]' \
"set -g mode-mouse on"
# In version 2.1 "mouse" replaced the previous 4 mouse options
if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.1" | bc)" = 1 ]' \
"set -g mouse on"
# UTF8 is autodetected in 2.2 onwards, but errors if explicitly set
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.2" | bc)" = 1 ]' \
"set -g utf8 on; set -g status-utf8 on; set -g mouse-utf8 on"
# New window pane is the same as the current pane's directory
bind c new-window -c '#{pane_current_path}'