]> Sergey Matveev's repositories - dotfiles.git/blob - x/bin/start-tabbed.sh
f7a0bf91f775f37c2451ee5f320d28caa9c1ef78
[dotfiles.git] / x / bin / start-tabbed.sh
1 #!/bin/sh
2
3 tabname=$1
4 shift
5 w=/tmp/tabbed-$tabname
6 [ -r "$w" ] && {
7     read winid < $w
8     wmclass=`xprop -id $winid WM_CLASS 2>/dev/null`
9     echo "$wmclass" | grep -q tabbed-$tabname && {
10         echo $winid
11         exit
12     }
13 }
14 [ -z "$NOTABSTART" ] || exit 1
15 tabbed -n tabbed-$tabname -d $@ > $w
16 exec $0 $tabname $@