dsurf (449B)
1 #!/bin/sh 2 # 3 # See the LICENSE file for copyright and license details. 4 # 5 6 xidfile="$HOME/.tmp/tabbed-surf.xid" 7 uri="" 8 9 if [ "$#" -gt 0 ]; 10 then 11 uri="$1" 12 fi 13 14 runtabbed() 15 { 16 tabbed -c -dn tabbed-surf -r 2 surf -e '' "$uri" >"$xidfile" \ 17 2>/dev/null & 18 } 19 20 if [ ! -r "$xidfile" ]; 21 then 22 runtabbed 23 else 24 xid=$(cat "$xidfile") 25 xprop -id "$xid" >/dev/null 2>&1 26 if [ $? -gt 0 ]; 27 then 28 runtabbed 29 else 30 surf -e "$xid" "$uri" >/dev/null 2>&1 & 31 fi 32 fi 33