lockscreen after suspend using systemd service (#51) (#53)

* lockscreen after suspend using systemd service (#51)

* renaming .service to betterlockscreen.service

* adding TimeoutSec to betterlockscreen.service
This commit is contained in:
Bosmak 2018-09-15 15:06:56 -03:00 committed by Pavan Jadhaw
parent 441d091da6
commit 33b7763283
2 changed files with 15 additions and 0 deletions

View file

@ -361,3 +361,5 @@ case "$1" in
echo "invalid argument"
;;
esac
exit 0

13
betterlockscreen.service Normal file
View file

@ -0,0 +1,13 @@
[Unit]
Description = Lock screen when going to sleep/suspend
[Service]
User=user
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/betterlockscreen --lock
TimeoutSec=infinity
[Install]
WantedBy=sleep.target
WantedBy=suspend.target