webext: Process full messages
[surf.git] / surf-open.sh
blobc22edc28643b69f19a279587bb1784534780ddc2
1 #!/bin/sh
3 # See the LICENSE file for copyright and license details.
6 xidfile="$HOME/tmp/tabbed-surf.xid"
7 uri=""
9 if [ "$#" -gt 0 ];
10 then
11 uri="$1"
14 runtabbed() {
15 tabbed -dn tabbed-surf -r 2 surf -e '' "$uri" >"$xidfile" \
16 2>/dev/null &
19 if [ ! -r "$xidfile" ];
20 then
21 runtabbed
22 else
23 xid=$(cat "$xidfile")
24 xprop -id "$xid" >/dev/null 2>&1
25 if [ $? -gt 0 ];
26 then
27 runtabbed
28 else
29 surf -e "$xid" "$uri" >/dev/null 2>&1 &