Agnus Dei (jackal) wrote,
Agnus Dei
jackal

Script to disable screenlock on MacOS X

[]$ cat disable_screen_lock 
#!/bin/bash

HOURS=$1

if [ $HOURS -eq 0 ]; then
	#turn this off
        killall caffeinate 
	exit

fi

if [ $# -eq 0 ]; then
	HOURS=2  # Default to 2 hours
fi
	
MINUTES=$((3600*$HOURS))
/usr/bin/caffeinate -dui -t $MINUTES & disown

Tags: #turn
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments