From 5fff35c645d4fa6f0fd178ebd0eb528fa73944ef Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Sun, 23 Feb 2020 21:40:47 +0100 Subject: [PATCH] Add screen-locker --- configs/files/xmonad.hs | 2 +- configs/xmonad.nix | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configs/files/xmonad.hs b/configs/files/xmonad.hs index 853362b..3255628 100644 --- a/configs/files/xmonad.hs +++ b/configs/files/xmonad.hs @@ -86,7 +86,7 @@ myRemoveKeys = [ myAdditionalKeys = [ ("M-q", kill), - ("M-x", spawn "~/.xmonad/scripts/lock.sh"), + ("M-x", spawn "i3lock -e -f -c 000000 -i ~/.wallpaper.png"), ("M-S-h", sendMessage (IncMasterN 1)), ("M-S-l", sendMessage (IncMasterN (-1))), ("M-S-", windows W.swapMaster), diff --git a/configs/xmonad.nix b/configs/xmonad.nix index de3400c..d623a89 100644 --- a/configs/xmonad.nix +++ b/configs/xmonad.nix @@ -21,6 +21,7 @@ xorg.xwininfo xorg.xkill scrot + i3lock ]; home.keyboard = { layout = "fr"; @@ -156,4 +157,9 @@ }; }; }; -} \ No newline at end of file + services.screen-locker = { + enable = true; + inactiveInterval = 5; + lockCmd = "\${pkgs.i3lock}/bin/i3lock -e -f -c 000000 -i ~/.wallpaper.png"; + }; +}