st/scripts/st_urllist
speediegq 7f65a6a7b9 Merge st-next into speedie/st main branch. Old st build can be found in
the 'previous' branch. This build is better in every way though!
2022-10-07 14:47:14 +02:00

15 lines
325 B
Bash
Executable file

#!/bin/sh
case "$RUNLAUNCHER" in
"") RUNLAUNCHER=dmenu ;;
esac
command -v xdg-open > /dev/null && BROWSER="xdg-open"
URL=$(st_xurls | grep http | awk '!_[$1]++' | $RUNLAUNCHER -l 10 -w $WINDOWID -g 1 -p 'Open:')
case "$1" in
"") $BROWSER $URL ;;
"-o") $BROWSER $URL ;;
"-c") echo $URL | xclip -selection clipboard ;;
esac