summaryrefslogtreecommitdiff
path: root/test.rc
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2024-02-11 00:04:31 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2024-02-11 00:04:31 +0000
commit7c6a945996a1d5510ff1412320ac7d07a0f82851 (patch)
treef77259f26b5c33307ba8ebc670951ed0acce1b00 /test.rc
parentb5a96b97ee2f3fd30e5935d2b3c2c6e0d96c4640 (diff)
Start working on it
Diffstat (limited to 'test.rc')
-rwxr-xr-xtest.rc26
1 files changed, 26 insertions, 0 deletions
diff --git a/test.rc b/test.rc
new file mode 100755
index 0000000..2b40c91
--- /dev/null
+++ b/test.rc
@@ -0,0 +1,26 @@
+#!/bin/rc
+
+rfork n
+
+guifs -s testgui
+
+dir=/mnt/gui
+sleep 1
+
+colours=(FF0000 00FF00 0000FF FFFF00 00FFFF FF00FF FFFFFF)
+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)
+ echo $colour^FF >> $dir/props/background # Set the background
+ sleep 1 # 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
+}
+
+# when the script ends, the old text window draws over the gui :joyd: I will fix that later.
+# For now, i just make the script sleep for a long time
+sleep 1000000