diff --git a/pmf-suspend b/pmf-suspend index 3e05c78..dd7e6c3 100644 --- a/pmf-suspend +++ b/pmf-suspend @@ -9,7 +9,7 @@ pmf-suspend 0 30 Timer will be set to 30 mintues Info: - Author: Livila. + Author: Livila Version: 1.0 This program is used for when you want to suspend your computer with a timer. @@ -40,11 +40,11 @@ fi # Print time and count down -countdown() { +runCountdown() { total=$(( $hour + $minute + $second )) while [ $total -gt 0 ] do - sleep 1 + sleep 1 & printf "\r%02d:%02d:%02d" $((total/3600)) $(( (total/60)%60)) $((total%60)) total=$(( $total - 1 )) wait @@ -56,7 +56,7 @@ user="stina" if [ $1 != "" ]; then - countdown + runCountdown fi # Execute scripts