From 7216c895b361096aedbab7f76949f41eaa3e5787 Mon Sep 17 00:00:00 2001 From: trotFunky Date: Sun, 5 Jul 2020 16:36:06 +0100 Subject: [PATCH] Add service file to run lock script on sleep --- Perso/systemd_timers/sleepLocki3.service | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Perso/systemd_timers/sleepLocki3.service diff --git a/Perso/systemd_timers/sleepLocki3.service b/Perso/systemd_timers/sleepLocki3.service new file mode 100644 index 0000000..c2c7f0c --- /dev/null +++ b/Perso/systemd_timers/sleepLocki3.service @@ -0,0 +1,15 @@ +#/etc/systemd/system/ + +[Unit] +Description=Turning i3lock on before sleep +Before=sleep.target + +[Service] +User=trotfunky +Type=forking +Environment=DISPLAY=:0 +ExecStart=/home/trotfunky/lockscreen.sh +ExecStartPost=sleep 1 + +[Install] +WantedBy=sleep.target