diff options
Diffstat (limited to 'dot/tmux.conf')
-rw-r--r-- | dot/tmux.conf | 147 |
1 files changed, 7 insertions, 140 deletions
diff --git a/dot/tmux.conf b/dot/tmux.conf index 2533760..6802fe9 100644 --- a/dot/tmux.conf +++ b/dot/tmux.conf | |||
@@ -1,143 +1,10 @@ | |||
1 | # use UTF8 | 1 | # this allows 'tmux attach' to work without an existing session; like screen -xRR |
2 | set -g utf8 | 2 | new-session |
3 | set-window-option -g utf8 on | ||
4 | 3 | ||
5 | # make tmux display things in 256 colors | 4 | # However, we don't want new-session to execute for reloads; so the rest |
6 | #set -g default-terminal "screen-256color" | 5 | # of the configuration will go in a separate file that will be sourced |
6 | # here. | ||
7 | 7 | ||
8 | unbind C-b | 8 | bind r source-file ~/.tmux.stage2.conf \; display "Reloaded!" |
9 | set -g prefix C-z | 9 | source-file ~/.tmux.stage2.conf |
10 | bind z send-prefix | ||
11 | |||
12 | # shorten command delay | ||
13 | set -sg escape-time 1 | ||
14 | |||
15 | # set window and pane index to 1 (0 by default) | ||
16 | set-option -g base-index 1 | ||
17 | setw -g pane-base-index 1 | ||
18 | |||
19 | # reload ~/.tmux.conf using PREFIX r | ||
20 | bind r source-file ~/.tmux.conf \; display "Reloaded!" | ||
21 | |||
22 | # use PREFIX | to split window horizontally and PREFIX - to split vertically | ||
23 | bind | split-window -h | ||
24 | bind - split-window -v | ||
25 | |||
26 | # Make the current window the first window | ||
27 | bind C-z swap-window -t 1 | ||
28 | |||
29 | # map Vi movement keys as pane movement keys | ||
30 | bind h select-pane -L | ||
31 | bind j select-pane -D | ||
32 | bind k select-pane -U | ||
33 | bind l select-pane -R | ||
34 | |||
35 | # and use C-h and C-l to cycle thru panes | ||
36 | bind -r C-h select-window -t :- | ||
37 | bind -r C-l select-window -t :+ | ||
38 | |||
39 | # resize panes using PREFIX H, J, K, L | ||
40 | bind H resize-pane -L 5 | ||
41 | bind J resize-pane -D 5 | ||
42 | bind K resize-pane -U 5 | ||
43 | bind L resize-pane -R 5 | ||
44 | |||
45 | # C-i for even-vertical arrangement and C-o to zoom current pane | ||
46 | #bind-key C-i select-layout even-vertical | ||
47 | #bind-key C-v select-layout even-horizontal | ||
48 | #bind-key C-o resize-pane -y 1000 | ||
49 | |||
50 | # Sync panes | ||
51 | #bind C-s set-window-option synchronize-panes | ||
52 | |||
53 | # explicitly disable mouse control | ||
54 | #setw -g mode-mouse off | ||
55 | #set -g mouse-select-pane off | ||
56 | #set -g mouse-resize-pane off | ||
57 | #set -g mouse-select-window off | ||
58 | |||
59 | # --------------------- | ||
60 | # Copy & Paste | ||
61 | # --------------------- | ||
62 | # provide access to the clipboard for pbpaste, pbcopy | ||
63 | #set-option -g default-command "reattach-to-user-namespace -l zsh" | ||
64 | #set-window-option -g automatic-rename on | ||
65 | |||
66 | # use vim keybindings in copy mode | ||
67 | setw -g mode-keys vi | ||
68 | |||
69 | # setup 'v' to begin selection as in Vim | ||
70 | #bind-key -t vi-copy v begin-selection | ||
71 | #bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | ||
72 | |||
73 | # update default binding of 'Enter' to also use copy-pipe | ||
74 | #unbind -t vi-copy Enter | ||
75 | #bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | ||
76 | |||
77 | #bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy ' | ||
78 | #bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy ' | ||
79 | |||
80 | # Save entire tmux history to a file - file will be on machine where tmux is | ||
81 | # running | ||
82 | #bind-key * command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer' | ||
83 | |||
84 | # ----------------------- | ||
85 | # Multistart panes | ||
86 | # ---------------------- | ||
87 | #bind-key P run-shell 'tmux-multistart as' | ||
88 | #bind-key A run-shell 'tmux-multistart alpha' | ||
89 | #bind-key B run-shell 'tmux-multistart beta' | ||
90 | #bind-key W run-shell 'tmux-multistart web' | ||
91 | #bind-key D run-shell 'tmux-multistart dev' | ||
92 | #bind-key T run-shell 'tmux-multistart txhub' | ||
93 | |||
94 | #bind-key C command-prompt -p "machine(s)/group: " "run-shell 'tmux-multistart %1'" | ||
95 | |||
96 | # ---------------------- | ||
97 | # set some pretty colors | ||
98 | # ---------------------- | ||
99 | # set pane colors - hilight the active pane | ||
100 | #set-option -g pane-border-fg colour235 #base02 | ||
101 | #set-option -g pane-active-border-fg colour33 #blue | ||
102 | #set-option -g pane-active-border-fg colour240 #base01 | ||
103 | |||
104 | # colorize messages in the command line | ||
105 | #set-option -g message-bg black #base02 | ||
106 | #set-option -g message-fg brightred #orange | ||
107 | |||
108 | # ---------------------- | ||
109 | # Status Bar | ||
110 | # ----------------------- | ||
111 | #set-option -g status on # turn the status bar on | ||
112 | #set -g status-utf8 on # set utf-8 for the status bar | ||
113 | #set -g status-interval 5 # set update frequencey (default 15 seconds) | ||
114 | #set -g status-justify centre # center window list for clarity | ||
115 | # set-option -g status-position top # position the status bar at top of screen | ||
116 | |||
117 | # visual notification of activity in other windows | ||
118 | #setw -g monitor-activity on | ||
119 | #set -g visual-activity on | ||
120 | |||
121 | # set color for status bar | ||
122 | #set-option -g status-bg colour235 #base02 | ||
123 | #set-option -g status-fg yellow #yellow | ||
124 | #set-option -g status-attr dim | ||
125 | |||
126 | # set window list colors - red for active and cyan for inactive | ||
127 | #set-window-option -g window-status-fg brightblue #base0 | ||
128 | #set-window-option -g window-status-bg colour236 | ||
129 | #set-window-option -g window-status-attr dim | ||
130 | |||
131 | #set-window-option -g window-status-current-fg brightred #orange | ||
132 | #set-window-option -g window-status-current-bg colour236 | ||
133 | #set-window-option -g window-status-current-attr bright | ||
134 | |||
135 | # show host name and IP address on left side of status bar | ||
136 | #set -g status-left-length 85 | ||
137 | #set -g status-left "#[fg=green]: #h : #[fg=brightblue]#(dig +short myip.opendns.com @resolver1.opendns.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #(ifconfig en3 | grep 'inet ' | awk '{print \"en3 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') #[fg=green]#(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk -F': ' '/ SSID/{print $2}') " | ||
138 | |||
139 | # show session name, window & pane number, date and time on right side of | ||
140 | # status bar | ||
141 | #set -g status-right-length 60 | ||
142 | #set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]: %d %b %Y #[fg=green]: %l:%M %p : #(date -u | awk '{print $4}') :" | ||
143 | 10 | ||