summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglenda <glenda@9front>2022-10-07 12:46:07 +0000
committerglenda <glenda@9front>2022-10-07 12:46:07 +0000
commitcbdb05a9092fff39ccdf7fb1d7363dadd3e7ed0f (patch)
tree07e052517e088fd6c32b12b28a198aaff68dfc29
parent712b09870a09964971d591f595b6aa1f64173340 (diff)
Demo progress bar
-rwxr-xr-xAPLDemo3
-rwxr-xr-xdemos/demo3
2 files changed, 5 insertions, 1 deletions
diff --git a/APLDemo b/APLDemo
index 1247140..3480bac 100755
--- a/APLDemo
+++ b/APLDemo
@@ -3,6 +3,7 @@
winid=`{grep -e '-apl' /mnt/acme/index | awk '{print $1}' }
if(~ $#winid 0){
kill apl | rc
+ echo 0 `{cat $1 | wc -l} >> /mnt/apldemo/data
win apl &
sleep 1
winid=`{grep -e '-apl' /mnt/acme/index | awk '{print $1}' }
@@ -20,4 +21,4 @@ next=`{echo $current + 1 | hoc}
echo $next > $state
cat $1 | awk 'NR=='$current > /mnt/acme/$winid/body
-
+echo $current `{cat $1 | wc -l} >> /mnt/apldemo/data
diff --git a/demos/demo b/demos/demo
index d128b17..2e72da2 100755
--- a/demos/demo
+++ b/demos/demo
@@ -1,5 +1,8 @@
#!/bin/rc
+bind '#|' /mnt/apldemo
font=/lib/font/bit/APL386/28/font
+@{while(test -x /mnt/apldemo/data1){cat /mnt/apldemo/data1}}| aux/statusbar -w 1682,750,1920,859 'demo' &
acme -c1 -f$font -F$font demos
kill apl | rc
+kill statusbar | rc