From bef55f10d9d7d3e2a9b4510c1df4a3b8dfd56c1e Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 2 Feb 2014 15:12:40 +0800 Subject: added helper xdotool scripts --- scripts/x-root-clean | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/x-root-clean (limited to 'scripts/x-root-clean') diff --git a/scripts/x-root-clean b/scripts/x-root-clean new file mode 100755 index 0000000..25fcbf4 --- /dev/null +++ b/scripts/x-root-clean @@ -0,0 +1,15 @@ +#!/bin/sh +# +# chromium will spew windows into root, which breaks x-alt-tab, so clean them up +# +pattern="$1"; shift + +x-window-list | awk -v parent="" -v pattern="$pattern - " ' + if ( match($0, pattern)) { + wid = $3; + if ( parent == "") { + parent = wid; + } else { + system(sprintf("xdotool windowreparent %s %s", wid, parent)); + } + }' -- cgit v1.2.3