]> Sergey Matveev's repositories - dotfiles.git/blobdiff - x/bin/start-tabbed.sh
Split huge bin/ to proper subdirectories
[dotfiles.git] / x / bin / start-tabbed.sh
diff --git a/x/bin/start-tabbed.sh b/x/bin/start-tabbed.sh
new file mode 100755 (executable)
index 0000000..f7a0bf9
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+tabname=$1
+shift
+w=/tmp/tabbed-$tabname
+[ -r "$w" ] && {
+    read winid < $w
+    wmclass=`xprop -id $winid WM_CLASS 2>/dev/null`
+    echo "$wmclass" | grep -q tabbed-$tabname && {
+        echo $winid
+        exit
+    }
+}
+[ -z "$NOTABSTART" ] || exit 1
+tabbed -n tabbed-$tabname -d $@ > $w
+exec $0 $tabname $@