From 16dc6a46b612fa152c2d1c2fbbe9b9cf073e51f3 Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Thu, 12 Apr 2018 11:02:55 -0600 Subject: [PATCH] Update tmux to hook into the MacOS clipboard --- home/.tmux.conf | 18 ++++++++++-------- install.sh | 23 ++++++++++++----------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/home/.tmux.conf b/home/.tmux.conf index 21e9f10..7234363 100644 --- a/home/.tmux.conf +++ b/home/.tmux.conf @@ -16,13 +16,14 @@ unbind r bind r source-file ~/.tmux.conf # Add keybindings for pane movement -bind-key -r -T prefix k select-pane -U -bind-key -r -T prefix j select-pane -D -bind-key -r -T prefix h select-pane -L -bind-key -r -T prefix l select-pane -R +bind-key -r -T prefix C-k select-pane -U +bind-key -r -T prefix C-j select-pane -D +bind-key -r -T prefix C-h select-pane -L +bind-key -r -T prefix C-l select-pane -R +unbind-key -T prefix l # Bindings for history management -bind-key C-l send-keys C-l \; clear-history +bind-key -r -T prefix BSpace send-keys C-l \; clear-history # Bindings for splitting bind-key -r -T prefix | split-window -h @@ -30,10 +31,11 @@ bind-key -r -T prefix - split-window -v unbind '"' unbind % +# Allow copy-n-paste to system clipboard +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" + # Visual Styling ####################################################################################################### -###################### -### DESIGN CHANGES ### -###################### # panes set -g pane-border-fg black diff --git a/install.sh b/install.sh index c09f52a..37a192f 100755 --- a/install.sh +++ b/install.sh @@ -32,17 +32,18 @@ echo "Updating brew, one moment..." brew update echo "Installing standard brew packages..." -which -s ag || brew install ag -which -s ctags || brew install ctags -which -s fswatch || brew install fswatch -which -s gcc || brew install gcc -which -s python3 || brew install python3 # must preceed macvim -which -s gvim || brew install macvim --with-python3 -which -s node || brew install node -which -s rbenv || brew install rbenv -which -s tmux || brew install tmux -which -s watch || brew install watch -which -s wget || brew install wget +which -s ag || brew install ag +which -s ctags || brew install ctags +which -s fswatch || brew install fswatch +which -s gcc || brew install gcc +which -s python3 || brew install python3 # must preceed macvim +which -s gvim || brew install macvim --with-python3 +which -s node || brew install node +which -s rbenv || brew install rbenv +which -s tmux || brew install tmux +which -s watch || brew install watch +which -s wget || brew install wget +which -s reattach-to-user-namespace || brew install reattach-to-user-namespace --with-wrap-pbcopy-and-pbpaste pushd /usr/local/bin >/dev/null ln -sf pip3 pip