From 709045cc831d6708b0d8703767f49bfcf2e30a7a Mon Sep 17 00:00:00 2001 From: Aqeel Akber Date: Thu, 1 Jan 2015 15:57:09 +1000 Subject: [PATCH] fixing systemd units --- .../{yoga-wacom-proximity.serivce => wacom-proximity.service} | 2 +- systemd/yoga-rotate.conf | 2 ++ systemd/yoga-rotate.service | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) rename systemd/{yoga-wacom-proximity.serivce => wacom-proximity.service} (64%) create mode 100644 systemd/yoga-rotate.conf diff --git a/systemd/yoga-wacom-proximity.serivce b/systemd/wacom-proximity.service similarity index 64% rename from systemd/yoga-wacom-proximity.serivce rename to systemd/wacom-proximity.service index 037ae0f..457cbcc 100644 --- a/systemd/yoga-wacom-proximity.serivce +++ b/systemd/wacom-proximity.service @@ -3,7 +3,7 @@ Description=[ThinkPad Yoga] Wacom digitizer proximity detection [Service] Type=forking -ExecStart=/usr/bin/env bash /opt/thinkpad-yoga-scripts/wacom/thinkpad-yoga-prox.sh +ExecStart=/usr/bin/bash /opt/thinkpad-yoga-scripts/wacom/thinkpad-yoga-prox.sh KillMode=process [Install] diff --git a/systemd/yoga-rotate.conf b/systemd/yoga-rotate.conf new file mode 100644 index 0000000..ede0436 --- /dev/null +++ b/systemd/yoga-rotate.conf @@ -0,0 +1,2 @@ +XAUTHORITY="ls -1 /home/*/.Xauthority | head -n 1" +DISPLAY=":`ls -1 /tmp/.X11-unix/ | sed -e s/^X//g | head -n 1`" diff --git a/systemd/yoga-rotate.service b/systemd/yoga-rotate.service index 84ff6cc..7701906 100644 --- a/systemd/yoga-rotate.service +++ b/systemd/yoga-rotate.service @@ -3,6 +3,7 @@ Description=[ThinkPad Yoga] Rotation with accelerometer [Service] Type=forking +EnvironmentFile=/etc/conf.d/yoga-rotate.conf ExecStart=/usr/bin/env python2 /opt/thinkpad-yoga-scripts/rotate/thinkpad-rotate.py KillMode=process