[haiku-commits] haiku: hrev53491 - 3rdparty/mmu_man/scripts

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 17 Sep 2019 13:34:26 -0400 (EDT)

hrev53491 adds 1 changeset to branch 'master'
old head: 9d87b2c5f89ad51c34e67348112d15c163791da8
new head: f60531661beee9c2bcde5df0e6b821dfc0bdfc24
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=f60531661bee+%5E9d87b2c5f89a

----------------------------------------------------------------------------

f60531661bee: Add a dump_windows script to help with automating screenshoting
  
  Oddly hey hangs when asking Pe, someone should investigate.
  
  Change-Id: Ic94d0a2600ceae5f73ce11d5666b6a7abd54c0c0

                                          [ François Revol <revol@xxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53491
Commit:      f60531661beee9c2bcde5df0e6b821dfc0bdfc24
URL:         https://git.haiku-os.org/haiku/commit/?id=f60531661bee
Author:      François Revol <revol@xxxxxxx>
Date:        Tue Sep 17 17:32:32 2019 UTC

----------------------------------------------------------------------------

1 file changed, 12 insertions(+)
3rdparty/mmu_man/scripts/dump_windows.sh | 12 ++++++++++++

----------------------------------------------------------------------------

diff --git a/3rdparty/mmu_man/scripts/dump_windows.sh 
b/3rdparty/mmu_man/scripts/dump_windows.sh
new file mode 100755
index 0000000000..2553834f6a
--- /dev/null
+++ b/3rdparty/mmu_man/scripts/dump_windows.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# get running app signatures and filter out background apps
+roster | sed -n 's/)$//;s/^ *//;/[^64] (/s/ .*(/\t/p' | while read team app; do
+       echo "# team $team $app"
+       c="$(hey "$team" count Window | grep result | cut -d" " -f 7)"
+       for w in $(seq 1 "$c"); do
+               title="$(hey "$team" get Title of Window "$w" | sed -n 
's/"$//;/"result"/s/.*TYPE) : "//p')"
+               frame="$(hey "$team" get Frame of Window "$w" | sed -n 
's/)$//;/"result"/s/.*TYPE) : BRect(//p')"
+               echo "hey \"$app\" set Frame of Window \"$title\" to 
\"BRect($frame)\""
+       done
+done


Other related posts:

  • » [haiku-commits] haiku: hrev53491 - 3rdparty/mmu_man/scripts - François Revol