Trivial zat optimizations
[dotfiles.git] / bin / bin / zat
1 #!/bin/sh
2
3 w=/tmp/tabbed-winid
4 [ -r "$w" ] && {
5     read winid < $w
6     wmclass=`xprop -id $winid WM_CLASS 2>/dev/null`
7     echo "$wmclass" | grep -q tabbed && {
8         XDG_DATA_DIRS=$HOME/zathura bin.zathura -e $winid $@
9         rm -f zathura.core
10         exit
11     }
12 }
13 tabbed -cd > $w
14 exec $0 $@