From 6cfa76a2e4af1a3b7d57b8b0005c190a693e200b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 19 Mar 2022 14:47:56 +0100 Subject: gkleen@sif: ... --- accounts/gkleen@sif/default.nix | 25 +++++++++++++------------ accounts/gkleen@sif/systemd.nix | 5 +++++ 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'accounts') diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 153b5884..708ed5de 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -231,6 +231,15 @@ in { enable = true; preset = "LoudnessEqualizer"; }; + + screen-locker = { + enable = true; + lockCommand = pkgs.writeShellScript "lock" '' + ${pkgs.playerctl}/bin/playerctl -a pause + exec ${pkgs.xsecurelock}/bin/xsecurelock + ''; + xss-lock.extraOptions = ["--tranfer-sleep-lock"]; + }; }; gtk = { @@ -256,18 +265,10 @@ in { windowManager.command = "${pkgs.coreutils}/bin/env -u SHLVL -- ${xmonad}/bin/xmonad"; - initExtra = let - lockScript = pkgs.writeScript "lock" '' - #!${pkgs.stdenv.shell} - ${pkgs.playerctl}/bin/playerctl -a pause - exec ${pkgs.xsecurelock}/bin/xsecurelock - ''; - in '' - ${pkgs.coreutils}/bin/env XSECURELOCK_WANT_FIRST_KEYPRESS=1 XSECURELOCK_DIM_ALPHA=1 ${pkgs.xss-lock}/bin/xss-lock -l -n ${pkgs.xsecurelock}/libexec/xsecurelock/dimmer -- ${lockScript} & - ${pkgs.xorg.xinput}/bin/xinput disable 'Synaptics TM3512-010' - ${pkgs.xorg.xset}/bin/xset s 590 10 - ${pkgs.xorg.xmodmap}/bin/xmodmap -e 'keysym Caps_Lock = Multi_key' - ''; + initExtra = '' + ${pkgs.xorg.xinput}/bin/xinput disable 'Synaptics TM3512-010' + ${pkgs.xorg.xmodmap}/bin/xmodmap -e 'keysym Caps_Lock = Multi_key' + ''; pointerCursor = { package = pkgs.vanilla-dmz; diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index ec02b1c3..1804ab0d 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -143,6 +143,11 @@ in { Restart = "always"; }; }; + xss-lock = { + Service = { + Environment = [ "XSECURELOCK_WANT_FIRST_KEYPRESS=1" ]; + }; + }; "autossh-socks@proxy.mathw0h:8119" = { Service = { Type = "notify"; -- cgit v1.2.3