From 647415fad10bfea984a271b3239e695b14941cb0 Mon Sep 17 00:00:00 2001 From: Niklas Date: Tue, 14 Jul 2020 23:18:01 +0200 Subject: [PATCH] added copy to clipboard script --- .local/share/scripts/copy-to-clipboard.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .local/share/scripts/copy-to-clipboard.sh diff --git a/.local/share/scripts/copy-to-clipboard.sh b/.local/share/scripts/copy-to-clipboard.sh new file mode 100755 index 0000000..acf7054 --- /dev/null +++ b/.local/share/scripts/copy-to-clipboard.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +set -e + +if test -t 0; then + >&2 echo "Provide a file" + exit 1 +fi + +xclip -i -selection "clipboard" < /dev/stdin + +notify-send -u low "${1:-Copied}" +