]> git.rmz.io Git - dotfiles.git/blobdiff - bin/old/windowmatching
merge bin from shada
[dotfiles.git] / bin / old / windowmatching
diff --git a/bin/old/windowmatching b/bin/old/windowmatching
new file mode 100755 (executable)
index 0000000..b4aac2e
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+## Gets the window propreties needed for compiz fusion's window regex
+
+xprop > windowpref.tmp;
+
+type=`cat windowpref.tmp | grep _NET_WM_WINDOW_TYPE | cut -d_ -f10`;
+role=`cat windowpref.tmp | grep WM_WINDOW_ROLE | cut -d\" -f2`;
+name=`cat windowpref.tmp | grep WM_CLASS | cut -d\" -f2`;
+class=`cat windowpref.tmp | grep WM_CLASS | cut -d\" -f4`;
+title=`cat windowpref.tmp | grep ^WM_NAME | cut -d\" -f2`;
+xid=`cat windowpref.tmp | grep WM_CLIENT_LEADER | cut -d' ' -f5`;
+
+echo type=$type;
+echo role=$role;
+echo name=$name;
+echo class=$class;
+echo title=$title;
+echo xid=$xid;
+echo state='modal, sticky, maxvert, maxhorz, shaded, skiptaskbar, skippager, hidden, fullscreen, above, below, or demandsattention';
+
+rm windowpref.tmp