-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
executable file
·87 lines (74 loc) · 2.63 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
# cat << EOF > /dev/null
# -- general -------------------------------------------------------------------
set -g default-terminal "screen-256color" # colors!
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -s focus-events on
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on
# -- display -------------------------------------------------------------------
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
set -g status-interval 10 # redraw status line every 10 seconds
# clear both screen and history
# -- navigation ----------------------------------------------------------------
# create session
bind C-c new-session
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# window navigation
unbind n
unbind p
bind-key l last-window
set -g status-position bottom # top/bottom
set -g display-panes-time 8000
# @w7u: change screen-256color to xterm, so as to enable **italic** in tmux
# e.i., enable `bat --italic-text=always`
# NOTE: 'xterm-256color' was set in MacOS::Terminal-Advanced-Terminfo
set -g default-terminal "xterm-256color"
# toggle mouse
bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse"
# {{{ plugins
# https://github.com/tmux-plugins/tpm/blob/master/README.md
# https://github.com/tmux-plugins/list
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'erikw/tmux-powerline'
# set -g @plugin 'jaclu/tmux-power-zoom'
run '~/.tmux/plugins/tpm/tpm'
# }}}
# EOF
#
# # exit the script if any statement returns a non-true return value
# set -e
#
# export LC_NUMERIC=C
#
# _toggle_mouse() {
# old=$(tmux show -gv mouse)
# new=""
#
# if [ "$old" = "on" ]; then
# new="off"
# else
# new="on"
# fi
#
# tmux set -g mouse $new \;\
# display "mouse: $new"
# }
# "$@"