st/scripts/st_urllist
2023-01-23 22:15:28 +01:00

15 lines
330 B
Bash
Executable file

#!/bin/sh
case "$RUNLAUNCHER" in
"") RUNLAUNCHER=spmenu ;;
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:' -na)
case "$1" in
"") $BROWSER $URL ;;
"-o") $BROWSER $URL ;;
"-c") echo $URL | xclip -selection clipboard ;;
esac