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
1 files changed,
1 insertions(+),
5 deletions(-)
jump to
M
shlide
→
shlide
@@ -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'