diff options
author | David Runge <david.runge@native-instruments.de> | 2018-04-23 08:37:04 +0200 |
---|---|---|
committer | David Runge <david.runge@native-instruments.de> | 2018-04-23 08:37:04 +0200 |
commit | ea4515f490085e6a806ecb12e6d33728ce9edaee (patch) | |
tree | 88238f2fa21ce5d92e485551630c8197590192e6 /bin | |
parent | 321047fd2d6da1c3b3260e2a89d1e6c2377cb534 (diff) | |
download | dotfiles-ea4515f490085e6a806ecb12e6d33728ce9edaee.tar.gz dotfiles-ea4515f490085e6a806ecb12e6d33728ce9edaee.tar.bz2 dotfiles-ea4515f490085e6a806ecb12e6d33728ce9edaee.tar.xz dotfiles-ea4515f490085e6a806ecb12e6d33728ce9edaee.zip |
bin/clipboard-wrapper: Adding script to wrap macOS and Linux/X11 specific clipboard systems (to be able to copy from tmux by selection, etc.).
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/clipboard-wrapper | 14 |
1 files changed, 14 insertions, 0 deletions
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 |