-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
executable file
·115 lines (109 loc) · 3.36 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
#assume-paste-time 1
#base-index 0
#bell-action any
#bell-on-alert off
#default-command ""
#default-shell "/bin/bash"
#default-terminal "screen"
#destroy-unattached off
#detach-on-destroy on
#display-panes-active-colour red
#display-panes-colour blue
#display-panes-time 1000
#display-time 750
#history-limit 2000
#lock-after-time 0
#lock-command "lock -np"
#lock-server on
#message-attr none
#message-bg yellow
#message-command-attr none
#message-command-bg black
#message-command-fg yellow
#message-command-style fg=yellow,bg=black
#message-fg black
#message-limit 20
#message-style fg=black,bg=yellow
#mouse-resize-pane off
#mouse-select-pane off
#mouse-select-window off
#mouse-utf8 on
#pane-active-border-bg default
#pane-active-border-fg green
#pane-active-border-style fg=green
#pane-border-bg default
#pane-border-fg default
#pane-border-style default
#prefix C-b
#prefix2 none
#renumber-windows off
#repeat-time 500
#set-remain-on-exit off
#set-titles off
#set-titles-string "#S:#I:#W - "#T""
#status on
#status-attr none
#status-bg green
#status-fg black
#status-interval 15
#status-justify left
#status-keys emacs
#status-left "[#S]"
#status-left-attr none
#status-left-bg default
#status-left-fg default
#status-left-length 10
#status-left-style default
#status-position bottom
#status-right ""#{=22:pane_title}" %H:%M %d-%b-%y"
#status-right-attr none
#status-right-bg default
#status-right-fg default
#status-right-length 40
#status-right-style default
#status-style fg=black,bg=green
#status-utf8 on
#terminal-overrides "*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cs=\E]12;%p1%s\007:Cr=\E]112\007:Ss=\E[%p1%d q:Se=\E[2 q,screen*:XT"
#update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
#visual-activity off
#visual-bell off
#visual-content off
#visual-silence off
#word-separators " -_@"
# mac. comment if not
set -g default-terminal "screen-256color"
# repeat last shell command on right pane (if it happens to be a shell)
bind-key a select-pane -t 1 \; send-keys Up C-m \; last-pane
# Idem but just types 'make'
bind-key m send-keys Escape :w C-m \; select-pane -t 1 \; send-keys make C-m \; last-pane\; send-keys a
# swap right pane in window 0 with default pane in window 1
#
# make sure our current window is listed as 0
# create a second window if it doesn't exist
# select our 0 window again in case we created a new one
# select our second pane in 0 window
# join that pane to window 1
# select the pane above the one we just moved there
# move that pane to window 0
# send the up arrow and enter to that pane (run last shell command)
# switch to last pane, which will be window 0, pane 0 (primary left)
# make sure we are horiontal-even
# redraw vim -- since it gets fucked up in this build when selecting
# layout programmatically. This whole thing assumes vim in left pane.
bind-key d \
if-shell 'tmux select-window -t :0' '' 'move-window -t :0' \; \
if-shell 'test $(tmux list-panes | wc -l) -gt 1' '' 'split-window -h' \; \
if-shell 'tmux select-window -t :1' '' 'new-window' \; \
select-window -t 0 \; \
select-pane -t 1 \; \
join-pane -t 1.0 \; \
select-pane -U \; \
join-pane -h -t 0.0 \; \
last-pane
# who knows what this does, but I can now scroll in a tmux pane
# linux
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
#set -g mode-mouse on
# mac
set -g terminal-overrides 'qterm*:smcup@:rmcup@'
set -g mouse on