X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;ds=inline;f=.tmux.conf;h=9b7e9d0ca8ad2dd3c546fdc8007951b7a9c4f145;hb=2be76ed436fada8dffc368a0544575eb69098431;hp=a8e7523a76f6a77ff61a62c0f87fcf704b56bf24;hpb=2f9e7ea7eef75b2db46c90066f24c37f8733cbfb;p=profile.git
diff --git a/.tmux.conf b/.tmux.conf
index a8e7523..9b7e9d0 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -1,6 +1,10 @@
################################################################################
# Options.
################################################################################
+# Start in home. The documentation says ~ is supported but tmux 1.7
+# barfs on it.
+set -g default-path "$HOME"
+
# Use vi keys for scrolling etc.
# Use lsk -t vi|emacs-
to see binds in table choice, copy or edit.
setw -g mode-keys vi
@@ -76,6 +80,8 @@ bind -r O swap-pane -U
bind w command-prompt -p "Select [.] to swap:" 'swap-pane -s . -t %1'
# Swap windows.
bind W choose-window "swap-window -t '%%'"
+# Renumber windows.
+bind M-w move-window -r -s : -t :
# Show panes.
bind = display-panes
# Move the current pane into a separate window.
@@ -135,7 +141,10 @@ bind { copy-mode -u
bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1'
bind "'" new-window -n "[buffer]" "cat > /dev/null" \; paste-buffer
# Toggle mouse mode as it is useful despite the flaws listed above.
-bind C-m set -g mouse-resize-pane \; set -g mouse-select-pane \; set -g mouse-select-window \; set -g mode-mouse
+# As of tmux 1.7 mode-mouse has three possible values so we can no
+# longer use an implied toggle.
+bind C-m set -g mouse-resize-pane on \; set -g mouse-select-pane on \; set -g mouse-select-window on \; set -g mode-mouse copy-mode
+bind M-m set -g mouse-resize-pane off \; set -g mouse-select-pane off \; set -g mouse-select-window off \; set -g mode-mouse off
################################################################################
# Fix missing binds in Vi modes.
@@ -195,6 +204,9 @@ setw -g window-status-activity-fg white
################################################################################
# Don't update the title bar.
set -g set-titles off
+set -g allow-rename off
+# Allow pane renames if no name was explicitly set.
+set -g automatic-rename on
# Status line black on white.
set -g status-attr none
set -g status-bg white
@@ -209,5 +221,3 @@ set -g status-right '#[fg=white,bg=colour8][#H:#S]'
# Window flags.
setw -g window-status-current-format '[#I.#P#F #W]'
setw -g window-status-format ' #I.#P#F #W '
-# Don't set window name. XXX: Issue with PROMPT_COMMAND.
-#setw -g automatic-rename off