From 7aeae86d36a1a04e93bb4be2216cb735acfab714 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Sun, 11 Feb 2024 15:18:27 +0000 Subject: More work --- test.rc | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'test.rc') diff --git a/test.rc b/test.rc index 2b40c91..7179b3b 100755 --- a/test.rc +++ b/test.rc @@ -2,25 +2,49 @@ rfork n +delay=0.25 + guifs -s testgui dir=/mnt/gui -sleep 1 +sleep $delay -colours=(FF0000 00FF00 0000FF FFFF00 00FFFF FF00FF FFFFFF) +colours=(FF0000 00FF00 0000FF FFFF00 00FFFF FF00FF FFFFFF 333333) for(colour in $colours){ - dir=$dir/`{cat $dir/clone} # Create a new sub element in the gui (for now, always a "container" with a small margin) + dir=$dir/`{cat $dir/clone} # Create a new sub element in the gui (for now, always a "container") echo $colour^FF >> $dir/props/background # Set the background - sleep 1 # Wait a bit + sleep $delay # Wait a bit } # Now do the same, but don't nest the elements for(colour in $colours){ subdir=$dir/`{cat $dir/clone} echo $colour^FF >> $subdir/props/background - sleep 1 + sleep $delay +} + +# Add some padding to all elements +for(f in `{walk /mnt/gui/ | grep 'padding$'}){ + echo 10 >> $f + sleep $delay +} + +# Add a border to the innermost elements +for(f in `{walk /mnt/gui | grep $dir'/[0-9]+/props/border$'}){ + echo 8888CCFF >> $f^colour + echo 5 >> $f + sleep $delay +} + +# Add some margin to the innermost elements +for(f in `{walk /mnt/gui | grep $dir'/[0-9]+/props/margin'}){ + echo 5 >> $f + sleep $delay } -# when the script ends, the old text window draws over the gui :joyd: I will fix that later. +# Make the inner container vertical +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 -- cgit v1.2.3