all repos — shlide @ b16457eceec42e7a98c8b75fb938c4f98cce12f0

slide deck presentation tool written in pure bash

Use bash's builtin method for screensize

This gets rid of annoying stty errors and makes our script fully bash
only.

Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Thu, 18 Jun 2020 09:01:19 +0530
commit

b16457eceec42e7a98c8b75fb938c4f98cce12f0

parent

dd38d65edd7823dd0f91ee8518597ab4c5b8e843

1 files changed, 1 insertions(+), 5 deletions(-)

jump to
M shlideshlide

@@ -75,11 +75,7 @@ # Clear the screen.

printf '\e[2J' # Get screen size. - case "$OSTYPE" in - "darwin"*) read -r LINES COLUMNS < <(stty -f /dev/tty size) ;; - "openbsd"*) shopt -s checkwinsize; (:;:) ;; - *) read -r LINES COLUMNS < <(stty -F /dev/tty size) ;; - esac + shopt -s checkwinsize; (:;:) # Write slide number at bottom left. printf '\e[H'