summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-06-27 12:11:17 -0400
committerLuke Smith <luke@lukesmith.xyz>2022-06-27 12:11:17 -0400
commitb416dffafbf8971fd0cae95ad6da205ace198425 (patch)
treed6b1142c1887be2bd22d036e7542561720b4934f /.local/bin
parentf03efe97d9d01407691a940d8d6703ab82547bc6 (diff)
parent6d0ad93751a3584788d066802a4b59fa8f7cab1b (diff)
downloadeibhear-b416dffafbf8971fd0cae95ad6da205ace198425.tar.gz
eibhear-b416dffafbf8971fd0cae95ad6da205ace198425.tar.zst
eibhear-b416dffafbf8971fd0cae95ad6da205ace198425.zip
Merge branch 'patch-4' of https://github.com/windeb204/voidrice into windeb204-patch-4
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/linkhandler5
1 files changed, 5 insertions, 0 deletions
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler
index fa74caf..a1c6394 100755
--- a/.local/bin/linkhandler
+++ b/.local/bin/linkhandler
@@ -6,6 +6,11 @@
# if a music file or pdf, it will download,
# otherwise it opens link in browser.
+# If -c passed, read from clipboard
+while getopts 'c' o; do case "${o}" in
+ c) set "$(xclip -o)";;
+esac done
+
# If no url given. Opens browser. For using script as $BROWSER.
[ -z "$1" ] && { "$BROWSER"; exit; }