mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 13:05:37 +00:00
fix: suspend w betterlockscreen
This commit is contained in:
parent
d3cd9891f3
commit
de023c2cd9
@ -252,14 +252,17 @@ in {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Ref: https://github.com/betterlockscreen/betterlockscreen/blob/next/system/betterlockscreen%40.service
|
||||||
systemd.services.lock = {
|
systemd.services.lock = {
|
||||||
description = "Lock the screen on resume from suspend";
|
description = "Lock the screen on resume from suspend";
|
||||||
before = [ "sleep.target" "suspend.target" ];
|
before = [ "sleep.target" "suspend.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = config.user;
|
User = config.user;
|
||||||
Type = "forking";
|
Type = "simple";
|
||||||
Environment = "DISPLAY=:0";
|
Environment = "DISPLAY=:0";
|
||||||
|
TimeoutSec = "infinity";
|
||||||
ExecStart = lockCmd;
|
ExecStart = lockCmd;
|
||||||
|
ExecStartPost = "${pkgs.coreutils-full}/bin/sleep 1";
|
||||||
};
|
};
|
||||||
wantedBy = [ "sleep.target" "suspend.target" ];
|
wantedBy = [ "sleep.target" "suspend.target" ];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user