mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-21 22:52:52 +00:00
bbe277c0db
Besides user-feedback I've found many resources showing that it is one common way to use forking here. I've also found the option "--nofork" for i3lock-color but I'm unsure of the side-effects (https://github.com/i3/i3lock/issues/109) as it was the less popular solution. https://gist.github.com/victorhaggqvist/603125bbc0f61a787d89 https://github.com/Raymo111/i3lock-color/issues/174#issuecomment-687149213 https://gist.github.com/Raymo111/91ffd256b7aca6a85e8a99d6331d3b7b
16 lines
315 B
Desktop File
16 lines
315 B
Desktop File
[Unit]
|
|
Description = Lock screen when going to sleep/suspend
|
|
Before=sleep.target
|
|
Before=suspend.target
|
|
|
|
[Service]
|
|
User=%I
|
|
Type=forking
|
|
Environment=DISPLAY=:0
|
|
ExecStart=/usr/local/bin/betterlockscreen --lock
|
|
TimeoutSec=infinity
|
|
ExecStartPost=/usr/bin/sleep 1
|
|
|
|
[Install]
|
|
WantedBy=sleep.target
|
|
WantedBy=suspend.target
|