From f7d82d5c5233d55b0feee48d1c15fc5264eb3f61 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 1 Jul 2014 16:17:11 +0200 Subject: [PATCH] lock: enable locking with modkey + delete Some keyboards are missing a lot of keys... --- rc/xlock.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/rc/xlock.lua b/rc/xlock.lua index 6e14cd7..48b6271 100644 --- a/rc/xlock.lua +++ b/rc/xlock.lua @@ -7,13 +7,15 @@ xrun("xautolock", "/bin/xautolock " .. icons.lookup({name = "system-lock-screen", type = "actions" })) +local lock = function() + awful.util.spawn(awful.util.getdir("config") .. + "/bin/locker", false) +end + config.keys.global = awful.util.table.join( config.keys.global, - awful.key({}, "XF86ScreenSaver", - function() - awful.util.spawn(awful.util.getdir("config") .. - "/bin/locker", false) - end)) + awful.key({}, "XF86ScreenSaver", lock), + awful.key({ modkey, }, "Delete", lock)) -- Configure DPMS os.execute("xset dpms 360 720 1200")