about summary refs log tree commit diff stats
path: root/bin/catgirl-open.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/catgirl-open.sh')
-rwxr-xr-xbin/catgirl-open.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/catgirl-open.sh b/bin/catgirl-open.sh
index 76673ec..3783422 100755
--- a/bin/catgirl-open.sh
+++ b/bin/catgirl-open.sh
@@ -12,20 +12,20 @@ choosenet() {
 }
 
 runtabbed() {
-	tabbed -fdn comm -r 2 $TERMINAL -into '' -e catgirl $(choosenet) >"$xidfile" &
+	network=$(choosenet)
+	tabbed -cdn comm -r 2 $TERMINAL -into '' -e catgirl $network >"$xidfile" &
 }
 
 if [ ! -r "$xidfile" ];
 then
 	runtabbed
 else
-	xid=$(<"$xidfile")
-	xprop -id "$xid" >/dev/null 2>&1
-	if [ $? -gt 0 ];
+	xid=$(cat "$xidfile")
+	if xprop -id "$xid" >/dev/null 2>&1
 	then
-		runtabbed
-	else
 		$TERMINAL -into "$xid" -e catgirl $(choosenet) >/dev/null 2>&1 &
+	else
+		runtabbed
 	fi
 fi