aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-09-29 17:21:27 +0200
committerBoris Faure <billiob@gmail.com>2018-09-29 17:21:27 +0200
commitfccc11408247caa9728c2967fe64eab075567005 (patch)
tree893069078e2ebdb7e2e0f069cfcebf4d7da4a3ee /tools
parenttermptyesc: DECFRA/DECERA finishes by $x/$z (diff)
downloadterminology-fccc11408247caa9728c2967fe64eab075567005.tar.gz
selection: handle scrolling and left/right margins
Diffstat (limited to 'tools')
-rwxr-xr-xtools/scroll.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/tools/scroll.sh b/tools/scroll.sh
index 39b064c..1211198 100755
--- a/tools/scroll.sh
+++ b/tools/scroll.sh
@@ -1,8 +1,26 @@
#/bin/bash
+# fill space with E
+printf '\033#8'
+# cursor to 0,0
+printf '\033[H'
+# restrict cursor
+printf '\033[?6h'
+# set top/bottom margins:
+printf '\033[10;20r'
+# allow left/right margins
+printf '\033[?69h'
+# set left/right margins:
+printf '\033[5;15s'
+# move to 0,0 with margins:
+printf '\033[H'
+# clean up rect
+printf '\033[1;1;11;11$z'
+echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
+
I=0
while [ 1 ]; do
- sleep 1
+ sleep 2
echo $I
I=`expr $I + 1`
done