From 41ca057f9068efc944d7a1d77d59b2ed7cc21e17 Mon Sep 17 00:00:00 2001 Message-Id: <41ca057f9068efc944d7a1d77d59b2ed7cc21e17.1717578336.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 21 Apr 2020 12:59:53 +0100 Subject: [PATCH] bin/wakey.zsh: Use `xwininfo -tree' like I should have done from the start. Organization: Straylight/Edgeware From: Mark Wooding I even commented in the commit message that I should have scanned recursively; I just didn't spot that `xwininfo' would do all of the heavy lifting for me. --- bin/wakey.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/wakey.zsh b/bin/wakey.zsh index 6a848ca..34048c0 100644 --- a/bin/wakey.zsh +++ b/bin/wakey.zsh @@ -36,7 +36,7 @@ __wakey_precmd () { if (( win == WINDOWID )); then suppress=t else - for i in $(xwininfo -children -id $win | + for i in $(xwininfo -tree -id $win | sed -n '/^ *[0-9]\+ child\(ren\)\?[.:]$/,$ { /^ *\(0x[0-9a-f]\+\) (.*$/s//\1/p }') -- [mdw]