From ae4693676e49907442d53d320a7c758557c9770a Mon Sep 17 00:00:00 2001 From: dweller Date: Wed, 16 Aug 2023 15:35:25 +0300 Subject: Initial commit --- xcopy | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 xcopy (limited to 'xcopy') diff --git a/xcopy b/xcopy new file mode 100755 index 0000000..1795526 --- /dev/null +++ b/xcopy @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Copyright (C) 2023 dwlr +# +# BSD 3-Clause License (BSD-3-Clause) +# See LICENSE for details + +set -e + + +{ + echo "" # TODO: why does it need a \n before the list? + + for i in "$@"; do + echo "file://$(realpath ${i})" + done + +} | xclip -sel clipboard -i -r -t text/uri-list -- cgit v1.2.3