Set :0 in env, change WantedBy=, and add short delay after locking to avoid the screen flashing after resume

This commit is contained in:
David Thurstenson 2017-02-07 09:47:32 -06:00
parent dea4c6640c
commit a5d021cf2e
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# Maintainer: David Thurstenson <thurstylark@gmail.com>
pkgname=xautolock-systemd
pkgver=0.1
pkgver=0.2
pkgrel=1
pkgdesc="Systemd unit to run 'xautolock -locknow' before suspend"
arch=('any')
@ -8,7 +8,7 @@ url="https://git.thurstylark.com/xautolock-systemd.git/"
license=('GPL')
depends=('xautolock')
source=("xautolock@.service")
md5sums=('f372d6cce05b70bce2191575d1789654')
md5sums=('85bb420848607f76c19fd8094b5597eb')
package() {
install -Dm644 ${srcdir}/xautolock@.service ${pkgdir}/etc/systemd/system/xautolock@.service

View File

@ -5,7 +5,9 @@ Before=sleep.target
[Service]
User=%I
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/xautolock -locknow
ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=suspend.target
WantedBy=sleep.target