From e9de2b426add307897a5b2507cea949d7da80137 Mon Sep 17 00:00:00 2001 From: Luca CPZ <luca.cpz@gmail.com> Date: Sun, 7 Jan 2018 12:50:39 +0100 Subject: [PATCH] add screen lock hotkey; closes #215 --- README.rst | 2 +- rc.lua.template | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index d17610d..a086fae 100644 --- a/README.rst +++ b/README.rst @@ -144,7 +144,7 @@ Blackburn and Dremora use Icons_, Vertex uses FontAwesome_: be sure to have bitm Additional default software used: :: - unclutter firefox scrot mpd mpc dmenu xsel + unclutter firefox scrot mpd mpc dmenu xsel xlock .. _BY-NC-SA: http://creativecommons.org/licenses/by-nc-sa/4.0 .. _b0ab0d7: https://github.com/lcpz/awesome-copycats/tree/b0ab0d7837987be81b9195a36631df773113d491 diff --git a/rc.lua.template b/rc.lua.template index 1783a7a..2604682 100644 --- a/rc.lua.template +++ b/rc.lua.template @@ -80,6 +80,7 @@ local editor = os.getenv("EDITOR") or "nano" local gui_editor = "gvim" local browser = "firefox" local guieditor = "atom" +local scrlocker = "xlock" awful.util.terminal = terminal awful.util.tagnames = { "1", "2", "3", "4", "5" } @@ -227,6 +228,10 @@ globalkeys = awful.util.table.join( awful.key({ altkey }, "p", function() os.execute("screenshot") end, {description = "take a screenshot", group = "hotkeys"}), + -- X screen locker + awful.key({ altkey, "Control" }, "l", function () os.execute(scrlocker) end, + {description = "lock screen", group = "hotkeys"}), + -- Hotkeys awful.key({ modkey, }, "s", hotkeys_popup.show_help, {description = "show help", group="awesome"}),