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