summaryrefslogtreecommitdiff
path: root/bin/guiscripts
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-12-12 00:14:59 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-12-12 00:14:59 +0100
commit347d3e683e2194b4b59eac3e0343f28089587c10 (patch)
treee139b6b6566602dcb372478e5ee5000d2471f363 /bin/guiscripts
parent797c829ac104ee480d4f46d091999d84d6f8c3bd (diff)
cleanup
sort results in reverse order so bottom results in terminal are shown first don't use echo
Diffstat (limited to 'bin/guiscripts')
-rwxr-xr-xbin/guiscripts/sturl4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/guiscripts/sturl b/bin/guiscripts/sturl
index 17f2beb..5b8b1e7 100755
--- a/bin/guiscripts/sturl
+++ b/bin/guiscripts/sturl
@@ -1,11 +1,11 @@
#!/bin/sh
-url="$(tr -d '\n' | grep -Eo "$regex" | dmenu -x -c -g 1 -l 10)"
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)"
[ -z "$url" ] && exit 1
case $1 in
- 'c') echo -n "$url" | xclip -sel c -r ;;
+ 'c') printf '%s' "$url" | xclip -sel c -r ;;
'o') linkhandler "$url" ;;
*) echo "no option" ;;
esac