Permalink
Browse files

surft: revised script to start surf in tabbed

  • Loading branch information...
1 parent bec2992 commit f81c2501f53e716aa64862e5d6ee48d31301eb98 @c00kiemon5ter committed Feb 9, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 surft
View
10 surft
@@ -1,12 +1,10 @@
#!/bin/sh
xidf="/tmp/.tabbed.xid"
+test -r "$xidf" && read -r -- xid <"$xidf"
-if test -r "$xidf" && pidof tabbed >/dev/null; then
- read -r -- xid <"$xidf"
- surf -e "$((xid))" "$1" &
-else
- tabbed -d surf -e >"$xidf"
- [ -n "$1" ] && surft "$1"
+if test -n "$xid" && xprop -id "$xid" &>/dev/null
+then surf -e "$((xid))" "$1" &
+else tabbed -d surf -e >"$xidf" && "$0" "$1"
fi

0 comments on commit f81c250

Please sign in to comment.