summaryrefslogtreecommitdiff
path: root/dot/tmux.stage2.conf
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2015-10-04 05:11:36 +0200
committerAndrew Cady <d@jerkface.net>2015-10-04 05:19:40 +0200
commit0c0e816bd417f98a1d1027dc41ce66a8572555c7 (patch)
tree6e3a8d763e269649bd14a91347104f48f60a16c7 /dot/tmux.stage2.conf
parentc4ccc221b42a3369c851f9b933bdd0f111c187e8 (diff)
improved tmux config
Diffstat (limited to 'dot/tmux.stage2.conf')
-rw-r--r--dot/tmux.stage2.conf157
1 files changed, 157 insertions, 0 deletions
diff --git a/dot/tmux.stage2.conf b/dot/tmux.stage2.conf
new file mode 100644
index 0000000..915b203
--- /dev/null
+++ b/dot/tmux.stage2.conf
@@ -0,0 +1,157 @@
1# use UTF8
2set -g utf8
3set-window-option -g utf8 on
4
5# make tmux display things in 256 colors
6#set -g default-terminal "screen-256color"
7
8unbind C-b
9set -g prefix C-z
10bind z send-prefix
11
12# redundantly bind some frequent commands so that the Control key does not have to be released
13bind-key C-n next-window
14bind-key C-p previous-window
15bind-key C-z last-window
16bind-key C-c new-window
17
18# Use vi-like keys to do selection and copying. Ctrl-A Escape starts copy mode,
19# 'v' starts text selection and 'y' copies (yanks).
20bind-key Escape copy-mode
21bind-key [ copy-mode
22bind-key C-[ copy-mode
23bind-key -t vi-copy v begin-selection
24bind-key -t vi-copy y copy-selection
25bind-key -t vi-copy Enter copy-selection
26#bind-key C-y run "tmux save-buffer - | xclip -i -selection clipboard"
27#bind-key C-p run "tmux set-buffer \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
28
29# TODO: get more from https://github.com/aaronbieber/dotfiles/blob/master/configs/tmux.conf
30
31# shorten command delay
32set -sg escape-time 1
33
34# set window and pane index to 1 (0 by default)
35set-option -g base-index 1
36setw -g pane-base-index 1
37
38# use PREFIX | to split window horizontally and PREFIX - to split vertically
39bind | split-window -h
40bind - split-window -v
41
42# map Vi movement keys as pane movement keys
43bind h select-pane -L
44bind j select-pane -D
45bind k select-pane -U
46bind l select-pane -R
47
48# and use C-h and C-l to cycle thru panes
49bind -r C-h select-window -t :-
50bind -r C-l select-window -t :+
51
52# resize panes using PREFIX H, J, K, L
53bind H resize-pane -L 5
54bind J resize-pane -D 5
55bind K resize-pane -U 5
56bind L resize-pane -R 5
57
58# C-i for even-vertical arrangement and C-o to zoom current pane
59#bind-key C-i select-layout even-vertical
60#bind-key C-v select-layout even-horizontal
61#bind-key C-o resize-pane -y 1000
62
63# Sync panes
64#bind C-s set-window-option synchronize-panes
65
66# explicitly disable mouse control
67#setw -g mode-mouse off
68#set -g mouse-select-pane off
69#set -g mouse-resize-pane off
70#set -g mouse-select-window off
71
72# ---------------------
73# Copy & Paste
74# ---------------------
75# provide access to the clipboard for pbpaste, pbcopy
76#set-option -g default-command "reattach-to-user-namespace -l zsh"
77#set-window-option -g automatic-rename on
78
79# use vim keybindings in copy mode
80setw -g mode-keys vi
81
82# setup 'v' to begin selection as in Vim
83#bind-key -t vi-copy v begin-selection
84#bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
85
86# update default binding of 'Enter' to also use copy-pipe
87#unbind -t vi-copy Enter
88#bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
89
90#bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
91#bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy '
92
93# Save entire tmux history to a file - file will be on machine where tmux is
94# running
95#bind-key * command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
96
97# -----------------------
98# Multistart panes
99# ----------------------
100#bind-key P run-shell 'tmux-multistart as'
101#bind-key A run-shell 'tmux-multistart alpha'
102#bind-key B run-shell 'tmux-multistart beta'
103#bind-key W run-shell 'tmux-multistart web'
104#bind-key D run-shell 'tmux-multistart dev'
105#bind-key T run-shell 'tmux-multistart txhub'
106
107#bind-key C command-prompt -p "machine(s)/group: " "run-shell 'tmux-multistart %1'"
108
109# ----------------------
110# set some pretty colors
111# ----------------------
112# set pane colors - hilight the active pane
113#set-option -g pane-border-fg colour235 #base02
114#set-option -g pane-active-border-fg colour33 #blue
115#set-option -g pane-active-border-fg colour240 #base01
116
117# colorize messages in the command line
118#set-option -g message-bg black #base02
119#set-option -g message-fg brightred #orange
120
121# ----------------------
122# Status Bar
123# -----------------------
124#set-option -g status on # turn the status bar on
125#set -g status-utf8 on # set utf-8 for the status bar
126#set -g status-interval 5 # set update frequencey (default 15 seconds)
127#set -g status-justify centre # center window list for clarity
128# set-option -g status-position top # position the status bar at top of screen
129
130# visual notification of activity in other windows
131#setw -g monitor-activity on
132#set -g visual-activity on
133
134# set color for status bar
135#set-option -g status-bg colour235 #base02
136#set-option -g status-fg yellow #yellow
137#set-option -g status-attr dim
138
139# set window list colors - red for active and cyan for inactive
140#set-window-option -g window-status-fg brightblue #base0
141#set-window-option -g window-status-bg colour236
142#set-window-option -g window-status-attr dim
143
144#set-window-option -g window-status-current-fg brightred #orange
145#set-window-option -g window-status-current-bg colour236
146#set-window-option -g window-status-current-attr bright
147
148# show host name and IP address on left side of status bar
149#set -g status-left-length 85
150#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}') "
151
152# show session name, window & pane number, date and time on right side of
153# status bar
154#set -g status-right-length 60
155#set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]: %d %b %Y #[fg=green]: %l:%M %p : #(date -u | awk '{print $4}') :"
156
157