about summary refs log tree commit diff
path: root/init/nixos.el
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2017-11-17T17·24+0100
committerVincent Ambo <tazjin@gmail.com>2017-11-17T17·24+0100
commitf18e578c4b0caf241345a205d9a89d4151ccc85b (patch)
tree568f7ecc01e1860cc3b78b452b8962ed910d10b9 /init/nixos.el
parent051c1116465141e0f5a9cf71bb0b08de06f7d874 (diff)
feat(nixos): Add key binding for starting i3lock
Diffstat (limited to 'init/nixos.el')
-rw-r--r--init/nixos.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/init/nixos.el b/init/nixos.el
index 28b5f7fcb84d..edeeca49d269 100644
--- a/init/nixos.el
+++ b/init/nixos.el
@@ -18,6 +18,10 @@
   (interactive)
   (shell-command "exec light -U 10"))
 
+(defun lock-screen ()
+  (interactive)
+  (shell-command "i3lock"))
+
 (if is-nixos
     (progn
       (message "Running on NixOS, configuring ExWM.")
@@ -53,6 +57,7 @@
       ;; Brightness keys
       (exwm-input-set-key (kbd "<XF86MonBrightnessDown>") #'brightness-down)
       (exwm-input-set-key (kbd "<XF86MonBrightnessUp>") #'brightness-up)
+      (exwm-input-set-key (kbd "<XF86Display>") #'lock-screen)
 
       ;; Line-editing shortcuts
       (exwm-input-set-simulation-keys