2020-02-29 07:41:05 +01:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
#warning! $locker MUST NOT FORK! It must wait to exit until after the screen has been unlocked.
|
|
|
|
|
|
|
|
#arguments
|
|
|
|
|
|
|
|
locker=$@
|
|
|
|
|
|
|
|
#make sure we set screen back to defaults if we force close the script
|
|
|
|
cleanup() {
|
2020-04-07 08:45:34 +02:00
|
|
|
xset dpms 0 0 600 #&& echo "cleaned up!"
|
2020-02-29 07:41:05 +01:00
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
|
|
|
trap "cleanup" EXIT
|
|
|
|
|
|
|
|
#runs the locker, than makes the screen time out after 1 sec of inactivity
|
|
|
|
xset dpms 0 0 1
|
|
|
|
$locker
|