From 65740627b2a63e72fa7b64fc68e4a1ae8f8bf5b7 Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Mon, 19 Sep 2016 13:30:22 +0200 Subject: [PATCH] fix locks --- i3/i3.nix | 6 +++--- nix/.nixpkgs/config.nix | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/i3/i3.nix b/i3/i3.nix index a625ae0..8e526dc 100644 --- a/i3/i3.nix +++ b/i3/i3.nix @@ -1,5 +1,5 @@ {writeTextDir, writeScript, lib, -rofi, xautolock, nitrogen, compton-git, i3status, i3-gaps +rofi, xss-lock, nitrogen, compton-git, i3status, i3-gaps , i3lock-fancy, xset, alsaUtils, brightness, screenshot_public, with_lock ? true}: @@ -126,7 +126,7 @@ bindsym $mod+ctrl+r reload bindsym $mod+Shift+r restart bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" -bindsym $mod+ctrl+l exec --no-startup-id ${xautolock}/bin/xautolock -locknow +bindsym $mod+ctrl+l exec --no-startup-id loginctl lock-session # resize window (you can also use the mouse for that) mode "resize" { @@ -171,7 +171,7 @@ exec --no-startup-id ${compton-git}/bin/compton --config /home/yorick/dotfiles/x '' + (lib.optionalString with_lock '' -exec --no-startup-id ${xautolock}/bin/xautolock -time 15 -locker ${locker} -lockaftersleep +exec --no-startup-id ${xss-lock}/bin/xss-lock -l -- ${locker} '') + '' diff --git a/nix/.nixpkgs/config.nix b/nix/.nixpkgs/config.nix index c5ad824..93a8e59 100644 --- a/nix/.nixpkgs/config.nix +++ b/nix/.nixpkgs/config.nix @@ -41,6 +41,17 @@ sha256 = "1fql3z6qv1is1jarjp24bqb7g5xi5sfchl9jqjd54yjvjxl0q61v"; }) {}; + i3lock-color = pkgs.i3lock-color.overrideDerivation (attrs: rec { + rev = "c8e1aece7301c3c6481bf2f695734f8d273f252e"; + name = "i3lock-color-2.7_rev${builtins.substring 0 7 rev}"; + src = fetchFromGitHub { + owner = "Arcaena"; + repo = "i3lock-color"; + inherit rev; + sha256 = "07fpvwgdfxsnxnf63idrz3n1kbyayr53lsfns2q775q93cz1mfia"; + }; + }); + yscripts = pkgs.callPackage ../../bin {};