From de023c2cd9442a050cd317de4beaf4b97e6a1734 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Thu, 19 May 2022 08:47:43 -0400 Subject: [PATCH] fix: suspend w betterlockscreen --- modules/graphical/i3.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/graphical/i3.nix b/modules/graphical/i3.nix index 854e42b..2a00e62 100644 --- a/modules/graphical/i3.nix +++ b/modules/graphical/i3.nix @@ -252,14 +252,17 @@ in { }; + # Ref: https://github.com/betterlockscreen/betterlockscreen/blob/next/system/betterlockscreen%40.service systemd.services.lock = { description = "Lock the screen on resume from suspend"; before = [ "sleep.target" "suspend.target" ]; serviceConfig = { User = config.user; - Type = "forking"; + Type = "simple"; Environment = "DISPLAY=:0"; + TimeoutSec = "infinity"; ExecStart = lockCmd; + ExecStartPost = "${pkgs.coreutils-full}/bin/sleep 1"; }; wantedBy = [ "sleep.target" "suspend.target" ]; };