summaryrefslogtreecommitdiff
path: root/dot/tmux.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.conf
parentc4ccc221b42a3369c851f9b933bdd0f111c187e8 (diff)
improved tmux config
Diffstat (limited to 'dot/tmux.conf')
-rw-r--r--dot/tmux.conf147
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
2set -g utf8 2new-session
3set-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
8unbind C-b 8bind r source-file ~/.tmux.stage2.conf \; display "Reloaded!"
9set -g prefix C-z 9source-file ~/.tmux.stage2.conf
10bind z send-prefix
11
12# shorten command delay
13set -sg escape-time 1
14
15# set window and pane index to 1 (0 by default)
16set-option -g base-index 1
17setw -g pane-base-index 1
18
19# reload ~/.tmux.conf using PREFIX r
20bind r source-file ~/.tmux.conf \; display "Reloaded!"
21
22# use PREFIX | to split window horizontally and PREFIX - to split vertically
23bind | split-window -h
24bind - split-window -v
25
26# Make the current window the first window
27bind C-z swap-window -t 1
28
29# map Vi movement keys as pane movement keys
30bind h select-pane -L
31bind j select-pane -D
32bind k select-pane -U
33bind l select-pane -R
34
35# and use C-h and C-l to cycle thru panes
36bind -r C-h select-window -t :-
37bind -r C-l select-window -t :+
38
39# resize panes using PREFIX H, J, K, L
40bind H resize-pane -L 5
41bind J resize-pane -D 5
42bind K resize-pane -U 5
43bind 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
67setw -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