From 9fb6eefaa250bab95c4394d52ebab8d47289db91 Mon Sep 17 00:00:00 2001 From: John Gee Date: Sat, 29 Sep 2018 17:58:00 +1200 Subject: [PATCH] Hide cursor while selecting version from menu --- bin/n | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/bin/n b/bin/n index f98507f..ca15d1c 100755 --- a/bin/n +++ b/bin/n @@ -121,12 +121,18 @@ set_arch() { # enter_fullscreen() { - tput smcup + # Set cursor to be invisible + tput civis 2> /dev/null + # Save screen contents + tput smcup 2> /dev/null stty -echo } leave_fullscreen() { - tput rmcup + # Set cursor to normal + tput cnorm 2> /dev/null + # Restore screen contentsq + tput rmcup 2> /dev/null stty echo } @@ -207,22 +213,6 @@ err_no_installed_print_help() { exit 1 } -# -# Hide cursor. -# - -hide_cursor() { - printf "\e[?25l" -} - -# -# Show cursor. -# - -show_cursor() { - printf "\e[?25h" -} - # # Output version after selected. #