From 3a0e0b8bb6e7fd9bcf510167980d9715e3faeb7b Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Thu, 15 Feb 2024 20:39:09 +0000 Subject: Even more work :) --- test.rc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'test.rc') diff --git a/test.rc b/test.rc index 11135a5..46710f8 100755 --- a/test.rc +++ b/test.rc @@ -1,13 +1,8 @@ #!/bin/rc -rfork n - -delay=0.25 - -guifs -s testgui +delay=0.1 dir=/mnt/gui -sleep $delay # split the window vertically into two, and make the top one a textbox echo vertical >> $dir/props/orientation @@ -62,6 +57,15 @@ for(f in `{walk /mnt/gui | grep $dir'/[0-9]+/props/margin'}){ echo vertical >> $dir/props/orientation show 'echo vertical >> '^$dir/props/orientation -# when the script ends, the old text window draws over the gui. I will fix that later. -# For now, i just make the script sleep for a long time -sleep 1000000 +fn printevents { + while(event = `''{read}){ + show $1': '$event + } +} + +# Attach an event printer to the innermost elements +for(f in `{walk /mnt/gui | grep $dir'/[0-9]+/event'}){ + printevents $f <$f >[2]/dev/null & +} + +wait -- cgit v1.2.3