From 3f7b5dd79688fa4d36302a60175ed3bb53e225d8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 25 Jan 2024 21:57:49 +0100 Subject: Use clipp and remove tac --- bin/guiscripts/sturl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/guiscripts/sturl b/bin/guiscripts/sturl index 5b8b1e7..d261e32 100755 --- a/bin/guiscripts/sturl +++ b/bin/guiscripts/sturl @@ -1,11 +1,11 @@ #!/bin/sh -regex='(((file|https?|gopher|gemini|ftps?|git)://|www\.)[a-zA-Z0-9.]*[:;a-zA-Z0-9./+@$&%?$\#=_~-]*)|(magnet:\?xt=urn:btih:[a-zA-Z0-9]*)' -url="$(tr -d '\n' | grep -Eo "$regex" | tac | commander -cl)" +regex='(((file|https?|gopher|gemini|ftps?|git)://|www\.)[a-zA-Z0-9.]*[:;!a-zA-Z0-9./+@$&%?$\#=_~-]*)|(magnet:\?xt=urn:btih:[a-zA-Z0-9]*)' +url="$(tr -d '\n' | grep -Eo "$regex" | commander -cl)" [ -z "$url" ] && exit 1 case $1 in - 'c') printf '%s' "$url" | xclip -sel c -r ;; + 'c') printf '%s' "$url" | clipp ;; 'o') linkhandler "$url" ;; *) echo "no option" ;; esac -- cgit v1.2.3