-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
141 lines (106 loc) · 4.03 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
set -g default-terminal "tmux"
set -g mouse on
bind-key -T root WheelUpPane select-pane -t =\; copy-mode -e\; send-keys -M
set -g renumber-windows on
set -g history-limit 30000
setw -g alternate-screen on
set -g allow-rename off
set -s escape-time 50
bind : command-prompt
set -g default-command /usr/bin/zsh
set -g default-shell /usr/bin/zsh
set -g base-index 1
set -g pane-base-index 1
set -g default-terminal "screen-256color"
# Clipboard
# bind -n C-S-c run "tmux save-buffer - | xsel -ib -"
# bind -n C-v-v run "tmux set-buffer \"$(xclip -ob)\"; tmux paste-buffer"
# bind -n C-c-c choose-buffer "run \"tmux save-buffer -b %% - | xclip -i -sel clipboard\" \; run \" tmux display \\\"Clipboard \(+\) filled with: $(tmux save-buffer -b %1 - | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \\\" \" "
# bind -n C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" \; run "tmux display \"Copied from \(+\) $(xclip -o -sel clipboard | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \""
# bind -n C-c run "tmux save-buffer - | xsel -ib"
# bind -n C-v run "xsel -ob | tmux load-buffer - ; tmux paste-buffer"
unbind p
unbind n
unbind c
unbind %
unbind '"'
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"
bind n new-window -ac "#{pane_current_path}"
bind p kill-pane
bind w kill-window
#bind left select-pane -L
#bind right select-pane -R
#bind up select-pane -U
#bind down select-pane -D
#bind -n C-h run "tmux select-pane -L"
#bind -n C-j run "tmux select-pane -D"
#bind -n C-k run "tmux select-pane -U"
#bind -n C-l run "tmux select-pane -R"
#bind -n C-\ run "tmux select-pane -l"
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
#bind S-Left previous-window
#bind S-Right next-window
bind -r < previous-window
bind -r > next-window
# # Automatically set window titles
set-option -g set-titles on
set-option -g set-titles-string '#T.#H:#S.#I.#P #W #T' # window number,program name,active (or not)
# Reload Tmux Session
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Notification
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# Modes
setw -g clock-mode-colour colour135
setw -g mode-attr bold
setw -g mode-fg colour236
setw -g mode-bg colour255
# Panes
set -g pane-border-bg colour236
set -g pane-border-fg colour08
set -g pane-active-border-bg colour236
set -g pane-active-border-fg colour08
# Status bar
set -g status-interval 1
set -g status-position bottom
set -g status-justify left
set -g status-bg colour236
set -g status-fg colour15
set -g status-attr dim
set -g status-left '#[bg=colour3,fg=colour233,bold] ❉ #S #[default] '
set -g status-right '#[fg=colour233,bg=colour195] ⌛︎%H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g automatic-rename off
setw -g window-status-current-fg colour233
setw -g window-status-current-bg colour2
setw -g window-status-current-attr none
setw -g window-status-current-format ' #[fg=colour196]➤ #[fg=colour233]#W '
setw -g window-status-fg colour255
setw -g window-status-bg colour236
setw -g window-status-attr none
setw -g window-status-format ' ⌘ #[fg=colour255]#W '
setw -g window-status-separator ' '
# Messages
set -g message-fg colour232
set -g message-bg colour9
set -g message-attr none