From 11647db257add5cc29c21c1b1421fa0ee85af961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Mon, 22 Dec 2025 11:28:19 +0100 Subject: [PATCH] xsecurelock: replace slock, run before suspend --- configs/i3.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/configs/i3.nix b/configs/i3.nix index f62bb59..5e2ff9c 100644 --- a/configs/i3.nix +++ b/configs/i3.nix @@ -86,9 +86,15 @@ in { }; }; - programs.slock.enable = true; - - environment.systemPackages = [dashboard]; + environment.systemPackages = [ + dashboard + pkgs.xsecurelock + ]; + environment.sessionVariables = { + XSECURELOCK_NO_COMPOSITE = "1"; + XSECURELOCK_BACKGROUND_COLOR = "navy"; + XSECURELOCK_PASSWORD_PROMPT = "time_hex"; + }; services.displayManager.defaultSession = "none+i3"; services.xserver = { @@ -113,7 +119,6 @@ in { ''; }; - home-manager.users.me = let modifier = "Mod4"; infoWorkspace = "ℹ"; @@ -275,7 +280,7 @@ in { xsession.windowManager.i3 = { enable = true; extraConfig = '' - bindsym --release ${modifier}+Shift+w exec /run/wrappers/bin/slock + bindsym --release ${modifier}+Shift+w exec xsecurelock exec "${pkgs.obsidian}/bin/obsidian" for_window [class="obsidian"] , move scratchpad @@ -286,6 +291,8 @@ in { assign [class="dashboard"] ${infoWorkspace} exec ${dashboard}/bin/dashboard + + exec --no-startup-id ${pkgs.xss-lock}/bin/xss-lock -- xsecurelock ''; config = { inherit modifier gaps modes bars floating window colors;