Skip to content

Commit

Permalink
Hide cursor during the countdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 committed May 19, 2024
1 parent b09d4a6 commit 9755b81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9755b81

Please sign in to comment.