From ea4515f490085e6a806ecb12e6d33728ce9edaee Mon Sep 17 00:00:00 2001 From: David Runge Date: Mon, 23 Apr 2018 08:37:04 +0200 Subject: bin/clipboard-wrapper: Adding script to wrap macOS and Linux/X11 specific clipboard systems (to be able to copy from tmux by selection, etc.). --- bin/clipboard-wrapper | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bin/clipboard-wrapper (limited to 'bin') diff --git a/bin/clipboard-wrapper b/bin/clipboard-wrapper new file mode 100755 index 0000000..5ac3dec --- /dev/null +++ b/bin/clipboard-wrapper @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' + +if [ $(uname) == "Darwin" ]; then + if [ "$@" == "-i" ]; then + pbcopy + elif [ "$@" == "-o" ]; then + pbpaste + fi +else + xclip "$@" +fi +exit 0 -- cgit v1.2.3-70-g09d2