-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
94 lines (70 loc) · 2.67 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
# ` is an interesting key for a prefix
set-option -g prefix `
# set-option -g prefix C-a
unbind-key C-b
bind-key ` last-window
bind-key a send-prefix
# we might need ` at some point, allow switching
# we can also send the prefix char with `-a
bind-key F11 set-option -g prefix C-a
bind-key F12 set-option -g prefix `
bind-key y run-shell "tmux show-buffer | xsel -i -b"
# 0 is too far from ` ;)
set -g base-index 1
set-option -g default-terminal "screen-256color"
# set-option -g mouse-select-pane off
# set-option -g mouse-resize-pane off
set-option -g status-keys vi
set-option -g bell-action any
set-option -g set-titles off
set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
set-option -g visual-bell off
set-option -g allow-rename off
bind -n C-k send-keys C-l \; run-shell "sleep .3s" \; clear-history
setw -g mode-keys vi
# setw -g mode-mouse off
setw -g monitor-activity off
# set-option -g mouse-select-pane off
# get-option -g mouse-resize-pane off
# setw -g mode-mouse off
#set -g mouse-select-window off
bind e previous-window
bind f next-window
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
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 s set-window-option synchronize-panes
# set-option -g status-justify centre
set-option -g status-justify left
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-left-length 40
set-option -g pane-active-border-fg green
set-option -g pane-active-border-bg black
set-option -g pane-border-fg white
set-option -g pane-border-bg black
set-option -g message-fg black
set-option -g message-bg green
#setw -g mode-bg black
setw -g window-status-bg black
setw -g window-status-current-fg green
set -g status-left '#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]'
# set -g status-right '#[fg=green]][#[fg=white] #T #[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g history-limit 4096
bind-key S command-prompt -p ssh: "new-window -n %1 'ssh %1'"
bind-key J command-prompt -p pane: "join-pane -t %1"
unbind-key Up
unbind-key Down
unbind-key Left
unbind-key Right
bind r source-file ~/.tmux.conf
set -sg escape-time 0