diff --git a/betterlockscreen b/betterlockscreen index 4644c58..d7a9de3 100755 --- a/betterlockscreen +++ b/betterlockscreen @@ -361,3 +361,5 @@ case "$1" in echo "invalid argument" ;; esac + +exit 0 \ No newline at end of file diff --git a/betterlockscreen.service b/betterlockscreen.service new file mode 100644 index 0000000..1c33189 --- /dev/null +++ b/betterlockscreen.service @@ -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