Browse Source

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

master
David Thurstenson 6 years ago
parent
commit
a5d021cf2e
  1. 4
      PKGBUILD
  2. 4
      xautolock@.service

4
PKGBUILD

@ -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

4
xautolock@.service

@ -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

Loading…
Cancel
Save