diff options
| author | Patrick <phaller@localhost.localdomain> | 2014-02-02 15:12:40 +0800 |
|---|---|---|
| committer | Patrick <phaller@localhost.localdomain> | 2014-02-02 15:12:40 +0800 |
| commit | bef55f10d9d7d3e2a9b4510c1df4a3b8dfd56c1e (patch) | |
| tree | c55d875cb002b2d52ecb0639e92a151b41e92592 /scripts/x-root-clean | |
| parent | bfae5ddfca31f42010241811571085fa6ac9bd72 (diff) | |
added helper xdotool scripts
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)); + } + }' |
