From 37c182cebbe78af78d31a7a0d6f2b0ac1cbc1213 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 22 Apr 2018 12:43:42 +0200 Subject: feat(desktop): Add "screen-lock with wallpapers" shell script --- desktop.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'desktop.nix') diff --git a/desktop.nix b/desktop.nix index 836f980261ad..d03cf1244fed 100644 --- a/desktop.nix +++ b/desktop.nix @@ -3,6 +3,9 @@ { config, lib, pkgs, ... }: let emacs = import ./emacs.nix { inherit pkgs; }; +screenLock = pkgs.writeShellScriptBin "screen-lock" '' + find ${pkgs.wallpapers} -name "*.png" | shuf -n1 | xargs i3lock -f -t -i +''; in { # Configure basic X-server stuff: services.xserver = { @@ -14,6 +17,8 @@ in { displayManager.sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localuser:$USER"; }; + # Add a shell script with random screen lock wallpaper selection + environment.systemPackages = [ screenLock ]; # Apparently when you have house guests they complain about your screen tearing! services.compton.enable = true; -- cgit 1.4.1