How to run systemd user service to trigger on sleep (aka. suspend, hibernate)?

All we need is an easy explanation of the problem, so here it is. Based on various sources I have cobbled together ~/.config/systemd/user/screenlock.service: [Unit] Description=Lock X session Before=sleep.target [Service] Environment=DISPLAY=:0…

Continue ReadingHow to run systemd user service to trigger on sleep (aka. suspend, hibernate)?