summary refs log tree commit diff
path: root/home/.local/bin/pbpaste
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-02-09 17:40:41 -0500
committerJune McEnroe <june@causal.agency>2021-02-09 17:40:41 -0500
commitd3aa4117f6210bb30dd6d17b42bdb40e3c5399d0 (patch)
tree209efd428c68fee383174ff35a016e1930249306 /home/.local/bin/pbpaste
parentUse flags for pbd client behaviour (diff)
downloadsrc-d3aa4117f6210bb30dd6d17b42bdb40e3c5399d0.tar.gz
src-d3aa4117f6210bb30dd6d17b42bdb40e3c5399d0.zip
Add pbcopy, pbpaste, open dispatch scripts
Diffstat (limited to '')
-rwxr-xr-xhome/.local/bin/pbpaste11
1 files changed, 11 insertions, 0 deletions
diff --git a/home/.local/bin/pbpaste b/home/.local/bin/pbpaste
new file mode 100755
index 00000000..2924f01e
--- /dev/null
+++ b/home/.local/bin/pbpaste
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -eu
+
+if [ -n "${SSH_CLIENT:-}" ]; then
+	exec pbd -p
+elif [ -n "${DISPLAY:-}" ]; then
+	exec xsel -bo
+else
+	echo "${0}: don't know what to do" >&2
+	exit 1
+fi