]> git.rmz.io Git - dotfiles.git/blob - bin/windowmatching
440047bd6817594f5638172b26e80df9b66c01a5
[dotfiles.git] / bin / windowmatching
1 #!/bin/bash
2
3 ## Gets the window propreties needed for compiz fusion's window regex
4
5 xprop > windowpref.tmp;
6
7 type=`cat windowpref.tmp | grep _NET_WM_WINDOW_TYPE | cut -d_ -f10`;
8 role=`cat windowpref.tmp | grep _WM_WINDOW_ROLE | cut -d\" -f2`;
9 name=`cat windowpref.tmp | grep WM_CLASS | cut -d\" -f2`;
10 class=`cat windowpref.tmp | grep WM_CLASS | cut -d\" -f4`;
11 title=`cat windowpref.tmp | grep "WM_NAME(STRING)" | cut -d\" -f2`;
12 xid=`cat windowpref.tmp | grep WM_CLIENT_LEADER | cut -d' ' -f5`;
13
14 echo type=$type;
15 echo role=$role;
16 echo name=$name;
17 echo class=$class;
18 echo title=$title;
19 echo xid=$xid;
20 echo state='modal, sticky, maxvert, maxhorz, shaded, skiptaskbar, skippager, hidden, fullscreen, above, below, or demandsattention';
21
22 rm windowpref.tmp;