diff options
Diffstat (limited to 'scripts/x-root-clean')
| -rwxr-xr-x | scripts/x-root-clean | 15 |
1 files changed, 15 insertions, 0 deletions
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)); + } + }' |
