From c74b4cd93e8618ac01b099087396e3283806a35e Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 5 Nov 2014 18:28:29 +0100 Subject: Integrate console lock screen into i3. Now it's enough to just press super + shift + escape in order to trigger the socket and thus the lock screen. Signed-off-by: aszlig --- modules/i3/default.nix | 6 ++++++ modules/i3/i3.conf | 3 +++ 2 files changed, 9 insertions(+) (limited to 'modules/i3') diff --git a/modules/i3/default.nix b/modules/i3/default.nix index 5e2b9998..7e2795d9 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -106,6 +106,12 @@ in inherit (pkgs.xorg) xsetroot; inherit wsConfig barConfig; + lockall = pkgs.writeScript "lockvt.sh" '' + #!${pkgs.stdenv.shell} + "${pkgs.socat}/bin/socat" - UNIX-CONNECT:/run/console-lock.sock \ + < /dev/null + ''; + postInstall = '' ${pkgs.i3}/bin/i3 -c "$target" -C ''; diff --git a/modules/i3/i3.conf b/modules/i3/i3.conf index 7ef5fa03..cd14c425 100644 --- a/modules/i3/i3.conf +++ b/modules/i3/i3.conf @@ -21,6 +21,9 @@ bindsym $mod+Shift+C kill # start dmenu (a program launcher) bindsym $mod+p exec --no-startup-id @dmenu@/bin/dmenu_run +# start lock screen +bindsym $mod+Shift+Escape exec --no-startup-id @lockall@ + # set background exec @xsetroot@/bin/xsetroot -solid black -- cgit 1.4.1