urlhand (1216B)
1 #!/bin/sh 2 3 links=$(grep -Eo '[A-Za-z][A-Za-z]*://[^ ]*' < /dev/stdin 2>/dev/null | sed 's/[>,:)]$//') 4 [ $(echo "$links" | wc -l) -eq 1 ] && link=$links || link=$(printf 'ALL\n%s\n' "$links" | dmenu -i) 5 [ "$link" = "" ] && exit 1 6 7 # hand=$(printf "mpvms video 8 # mpvms 9 # mpv --pause 10 # popupmpv 11 # youtube-dl --add-metadata -ic 12 # youtube-dl --add-metadata -xic 13 # $(xprop -id $(cat /tmp/tabbed.xid) >/dev/null && echo "surf -e $(cat /tmp/tabbed.xid)") 14 # >/tmp/tabbed.xid tabbed -cr2 surf -e '' 15 # toxclip 16 # netimg 17 # netpdf 18 # popupcurl 19 # popupcgo 20 # popupw3m 21 # gpgimport 22 # torsocks mpvms video 23 # torsocks mpvms 24 # torsocks mpv --pause 25 # torsocks popupmpv 26 # torsocks youtube-dl --add-metadata -ic 27 # torsocks youtube-dl --add-metadata -xic 28 # torsocks $(xprop -id $(cat /tmp/tabbed.xid) >/dev/null && echo "surf -e $(cat /tmp/tabbed.xid)") 29 # torsocks >/tmp/tabbed.xid tabbed -cr2 surf -e '' 30 # torsocks netimg 31 # torsocks netpdf 32 # torsocks popupcurl 33 # torsocks popupcgo 34 # torsocks popupw3m 35 # torsocks gpgimport" | dmenu -i) 36 37 # [ "$link" = "ALL" ] && { 38 # for u in $links 39 # do 40 # nohup sh -c "$hand $u" >/dev/null & 41 # done 42 # } || nohup sh -c "$hand $link" >/dev/null & 43 44 [ "$link" = "ALL" ] && { 45 plumb $links 46 } || plumb "$link"