From 9755b81555f20aa35a1f54ae234364c0e051ef91 Mon Sep 17 00:00:00 2001 From: Robin Candau Date: Sun, 19 May 2024 22:33:57 +0200 Subject: [PATCH] Hide cursor during the countdown --- src/script/arch-update.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/script/arch-update.sh b/src/script/arch-update.sh index dfa09b5..b4fa491 100755 --- a/src/script/arch-update.sh +++ b/src/script/arch-update.sh @@ -606,8 +606,13 @@ kernel_reboot() { case "${answer}" in "$(eval_gettext "Y")"|"$(eval_gettext "y")") echo + + restore_cursor() { + tput cnorm + } + trap restore_cursor EXIT for sec in {5..1}; do - echo -ne "${blue}==>${color_off}${bold} "$(eval_gettext "Rebooting in ${sec}...\r")"${color_off}" + tput civis ; echo -ne "${blue}==>${color_off}${bold} "$(eval_gettext "Rebooting in ${sec}...\r")"${color_off}" sleep 1 done