diff --git a/pmf-suspend b/pmf-suspend index 8c9301f..c210a8e 100644 --- a/pmf-suspend +++ b/pmf-suspend @@ -42,15 +42,18 @@ fi # Print time and count down +suspendText="Suspending computer in: " runCountdown() { total=$(( $hour + $minute + $second )) while [ $total -gt 0 ] do sleep 1 & - printf "\r%02d:%02d:%02d" $((total/3600)) $(( (total/60)%60)) $((total%60)) + printf "\r$suspendText%02d:%02d:%02d" $((total/3600)) $(( (total/60)%60)) $((total%60)) total=$(( $total - 1 )) wait done + # Setting timer to 00:00:00 when it is finished + printf "\r$suspendText%02d:%02d:%02d" 00 00 00 echo } @@ -60,6 +63,7 @@ if [ $1 != "" ]; then runCountdown fi + # Execute scripts # Lock screen