X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.tmux.conf;h=d69c31fab0dbfe0af270ead32f48a46835aa3afa;hb=ef6b6d7f9c963665a71785098a9718b089e280b5;hp=e834f093021796305208d716380736bc621b472f;hpb=094bc317ad7d7907a5c87477530db4d24bf1c534;p=profile.git diff --git a/.tmux.conf b/.tmux.conf index e834f09..d69c31f 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -16,6 +16,14 @@ setw -g clock-mode-style 24 # Scrollback buffer. set -g history-limit 4096 +# Don't use the mouse to select text by default. +# It has two important flaws. Double-clicking to select a word doesn't work. +# Middle clicking to paste doesn't work. +set -g mouse-resize-pane off +set -g mouse-select-pane off +set -g mouse-select-window off +set -g mode-mouse off + ################################################################################ # Screen compatibility. ################################################################################ @@ -76,8 +84,8 @@ bind . select-layout even-vertical bind , select-layout tiled # Simulate maximising the window. bind / select-layout even-vertical \; swap-pane -s top \; resize-pane -D 9999 -# Show windows -bind - list-windows +# Select windows. +bind - choose-window # Set current window title. bind t command-prompt -p "Set window's title to:" 'rename-window %1' # Show clock. @@ -96,6 +104,8 @@ bind { copy-mode -u #bind '"' choose-buffer 'show-buffer -b %%' bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1' bind "'" show-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 ################################################################################ # Fix missing binds in Vi modes. @@ -116,7 +126,7 @@ bind -t vi-copy y copy-selection ################################################################################ set -g default-terminal 'screen-256color' # PuTTY needs help to set bold colours. -set -a -g terminal-overrides ',putty-256color:C8' +set -a -g terminal-overrides ',putty-256color:C8:Ms=\\E]52;%p1%s;%p2%s\\007m' ################################################################################ # Window and pane settings.