Set :0 in env, change WantedBy=, and add short delay after locking to avoid the screen flashing after resume
This commit is contained in:
parent
dea4c6640c
commit
a5d021cf2e
4
PKGBUILD
4
PKGBUILD
|
@ -1,6 +1,6 @@
|
||||||
# Maintainer: David Thurstenson <thurstylark@gmail.com>
|
# Maintainer: David Thurstenson <thurstylark@gmail.com>
|
||||||
pkgname=xautolock-systemd
|
pkgname=xautolock-systemd
|
||||||
pkgver=0.1
|
pkgver=0.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Systemd unit to run 'xautolock -locknow' before suspend"
|
pkgdesc="Systemd unit to run 'xautolock -locknow' before suspend"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
@ -8,7 +8,7 @@ url="https://git.thurstylark.com/xautolock-systemd.git/"
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
depends=('xautolock')
|
depends=('xautolock')
|
||||||
source=("xautolock@.service")
|
source=("xautolock@.service")
|
||||||
md5sums=('f372d6cce05b70bce2191575d1789654')
|
md5sums=('85bb420848607f76c19fd8094b5597eb')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -Dm644 ${srcdir}/xautolock@.service ${pkgdir}/etc/systemd/system/xautolock@.service
|
install -Dm644 ${srcdir}/xautolock@.service ${pkgdir}/etc/systemd/system/xautolock@.service
|
||||||
|
|
|
@ -5,7 +5,9 @@ Before=sleep.target
|
||||||
[Service]
|
[Service]
|
||||||
User=%I
|
User=%I
|
||||||
Type=simple
|
Type=simple
|
||||||
|
Environment=DISPLAY=:0
|
||||||
ExecStart=/usr/bin/xautolock -locknow
|
ExecStart=/usr/bin/xautolock -locknow
|
||||||
|
ExecStartPost=/usr/bin/sleep 1
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=suspend.target
|
WantedBy=sleep.target
|
||||||
|
|
Loading…
Reference in New Issue