-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
122 lines (95 loc) · 4.96 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
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
# ------------------------------------------------------------ #
# Windows
# ------------------------------------------------------------ #
set-option -g base-index 0
set-option -g set-titles on
set-option default-terminal "xterm-256color"
# ------------------------------------------------------------ #
# Styles
# ------------------------------------------------------------ #
# set-option -g status-utf8 on
setw -g window-status-current-format " #[fg=black]#I.#[default]#W "
setw -g window-status-format " #I.#[default]#W "
set -g status-right '#H#[default]'
set-option -g status-left '⣿ ❐ #S#[default] ⡇'
set-option -g repeat-time 1000
set -sg escape-time 1
set-window-option -g mode-style bg=white,fg=black
set-window-option -g status-style bg="#323268",fg="white"
set-window-option -g window-status-style bg="#3b3b97",fg="white"
set-window-option -g window-status-current-style bg="#a6ff00",fg="black"
# set-window-option -g window-status-current-attr bold
# ------------------------------------------------------------ #
# Key Bindings
# ------------------------------------------------------------ #
set-window-option -g mode-keys emacs
bind C-r source-file ~/.tmux.conf
bind b split-window "tmux lsw | percol --initial-index $(tmux lsw | awk '/active.$/ {print NR-1}') | cut -d':' -f 1 | xargs tmux select-window -t"
bind B split-window "tmux ls | percol --initial-index $(tmux ls | awk '/attached.$/ {print NR-1}') | cut -d':' -f 1 | xargs tmux switch-client -t"
unbind k
bind k confirm-before "kill-pane"
unbind K
bind K confirm-before "kill-window"
bind v split-window
bind h split-window -h
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind | split-window -h
bind - split-window -v
# ------------------------------------------------------------ #
# Key Bindings / Copy Mode
# ------------------------------------------------------------ #
bind-key -T copy-mode-emacs C-d send-keys -X page-down
bind-key -T copy-mode-emacs C-u send-keys -X page-up
bind-key -T copy-mode-emacs C-h send-keys -X cursor-left
bind-key -T copy-mode-emacs Enter send-keys -X copy-selection
bind-key -T copy-mode-emacs C-y send-keys -X scroll-up
# bind-key -T copy-mode-emacs $ send-keys -X end-of-line
# bind-key -T copy-mode-emacs C end-keys -X run-shell
bind-key -T copy-mode-emacs / send-keys -X search-forward
bind-key -T copy-mode-emacs B send-keys -X previous-space
bind-key -T copy-mode-emacs D send-keys -X copy-end-of-line
bind-key -T copy-mode-emacs E send-keys -X next-space-end
bind-key -T copy-mode-emacs F send-keys -X jump-backward
bind-key -T copy-mode-emacs G send-keys -X history-bottom
bind-key -T copy-mode-emacs H send-keys -X top-line
bind-key -T copy-mode-emacs J send-keys -X scroll-down
bind-key -T copy-mode-emacs K send-keys -X scroll-up
bind-key -T copy-mode-emacs L send-keys -X bottom-line
bind-key -T copy-mode-emacs M send-keys -X middle-line
bind-key -T copy-mode-emacs N send-keys -X search-reverse
# bind-key -T copy-mode-emacs T send-keys -X jump-to-backward
bind-key -T copy-mode-emacs W send-keys -X next-space
# bind-key -T copy-mode-emacs ^ send-keys -X back-to-indentation
bind-key -T copy-mode-emacs b send-keys -X previous-word
bind-key -T copy-mode-emacs e send-keys -X next-word-end
bind-key -T copy-mode-emacs f send-keys -X jump-forward
bind-key -T copy-mode-emacs g send-keys -X history-top
bind-key -T copy-mode-emacs h send-keys -X cursor-left
bind-key -T copy-mode-emacs j send-keys -X cursor-down
bind-key -T copy-mode-emacs k send-keys -X cursor-up
bind-key -T copy-mode-emacs l send-keys -X cursor-right
bind-key -T copy-mode-emacs n send-keys -X search-again
bind-key -T copy-mode-emacs q send-keys -X cancel
# bind-key -T copy-mode-emacs t send-keys -X jump-to-forward
bind-key -T copy-mode-emacs v send-keys -X rectangle-toggle
bind-key -T copy-mode-emacs w send-keys -X next-word
bind-key -T copy-mode-emacs BSpace send-keys -X cursor-left
bind-key -T copy-mode-emacs NPage send-keys -X page-down
bind-key -T copy-mode-emacs PPage send-keys -X page-up
bind-key -T copy-mode-emacs Up send-keys -X cursor-up
bind-key -T copy-mode-emacs Down send-keys -X cursor-down
bind-key -T copy-mode-emacs Left send-keys -X cursor-left
bind-key -T copy-mode-emacs Right send-keys -X cursor-right
bind-key -T copy-mode-emacs C-Up send-keys -X scroll-up
bind-key -T copy-mode-emacs C-Down send-keys -X scroll-down
# ------------------------------------------------------------ #
# Key Bindings without Prefix (-n option)
# http://superuser.com/questions/238545/binding-a-command-in-tmux-without-using-the-prefix-key
# ------------------------------------------------------------ #
bind -n C-M-j next-window
bind -n C-M-k previous-window
# ------------------------------------------------------------ #
# Some novel options
# ------------------------------------------------------------ #
set-option -g renumber-windows on
set -g mouse on