aboutsummaryrefslogtreecommitdiff
path: root/.config/systemd
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2020-05-24 14:39:51 -0400
committertdro <tdro@users.noreply.github.com>2020-05-24 14:39:51 -0400
commita6aab1dad33d702e8339be70bac5d44d11358608 (patch)
treedee12578b34c384bdce8ae25162d7a91343a075b /.config/systemd
parent1cca77a9565f2b8a3efefc7390a78a50ae8287fe (diff)
downloaddotfiles-a6aab1dad33d702e8339be70bac5d44d11358608.tar.gz
dotfiles-a6aab1dad33d702e8339be70bac5d44d11358608.tar.bz2
dotfiles-a6aab1dad33d702e8339be70bac5d44d11358608.zip
.config/systemd/user/x11vnc-resume: Watch the dbus session
systemd does not allow the user to hook into sleep or suspend targets
Diffstat (limited to '.config/systemd')
-rw-r--r--.config/systemd/user/x11vnc-resume.service5
1 files changed, 2 insertions, 3 deletions
diff --git a/.config/systemd/user/x11vnc-resume.service b/.config/systemd/user/x11vnc-resume.service
index 38f2060..672bd1c 100644
--- a/.config/systemd/user/x11vnc-resume.service
+++ b/.config/systemd/user/x11vnc-resume.service
@@ -1,11 +1,10 @@
[Unit]
Description=Restart x11vnc after resume
-After=suspend.target
[Service]
Type=simple
-ExecStart=/usr/bin/env systemctl --user --no-block restart x11vnc
+ExecStart=/usr/bin/env sh -c 'dbus-monitor --system | while read; do grep -q 'post-resume.target' && systemctl --user restart x11vnc; done'
SyslogIdentifier=x11vnc-resume
[Install]
-WantedBy=suspend.target
+WantedBy=default.target