diff --git a/pmf-suspend b/pmf-suspend index a914a63..fb65645 100644 --- a/pmf-suspend +++ b/pmf-suspend @@ -9,15 +9,16 @@ PARAM_3=$3 PARAM_4=$4 -# Set user +# Set user to lock COMPUTER_USER="stina" # Help -if [[ $1 == "help" || $1 == "--help" ]]; then +if [[ $1 == "help" || $1 == "--help" || $1 == "" ]]; then echo -e "Usage: - pmf-suspend [--help|--simulation|[0-9|0-9|0-9]] - pmf-suspend Suspend system - pmf-suspend help|--help Show this message + pmf-suspend now|--help|--simulation|0-9[ 0-9[ 0-9]] + + pmf-suspend now Lock the screen and suspend system + pmf-suspend --help|help Show this message pmf-suspend --simulation Run a simulation of the program, execute nothing. pmf-suspend 1 2 3 Timer will be set to 1s, 2m, 3h pmf-suspend 0 30 Timer will be set to 30 mintues @@ -82,12 +83,14 @@ echo } -if [ $PARAM_1 != "" ]; then +if [ $PARAM_1 != "now" ]; then runCountdown fi # If the user is running a simulation then don't execute any scripts. if [ $SIMULATION == 1 ]; then + echo "Locking screen..."; + echo "Suspending computer..."; exit 1 fi