From 5e728e94ae049a078a38245f858344fce94e48dc Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Mon, 5 Sep 2016 20:32:32 +0300 Subject: [PATCH] Update tux mouse & keyboard settings --- .tmux.conf | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 7846bd2..23aafed 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -17,14 +17,8 @@ set -sg escape-time 1 set -g base-index 1 setw -g pane-base-index 1 -# Configure Mouse -setw -g mode-mouse on -set -g mouse-select-pane on -set -g mouse-resize-pane on -set -g mouse-select-window on - -set -g status-utf8 on -setw -g utf8 on +# set -g status-utf8 on +# setw -g utf8 on # ------------------- # Visual Settings @@ -58,6 +52,10 @@ set -g window-status-current-format "#[fg=white,bg=colour25,noreverse,bold] #I # # Custom keybindings # -------------------- +set -g mouse on +bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'" + + setw -g mode-keys vi bind C-a send-prefix @@ -108,4 +106,5 @@ bind -r L resize-pane -R 5 bind Escape copy-mode bind p paste-buffer bind -t vi-copy 'v' begin-selection -bind C-c run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null" +bind C-c run-shell "bash -c 'tmux show-buffer | reattach-to-user-namespace pbcopy'" \; display 'Copied to clipboard' +