From 9b65182eec3ea4ad0f8660a32d2c903fd89d7c89 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Fri, 10 Feb 2017 17:12:54 +0100 Subject: [PATCH] Added lock screen --- awesome/rc.lua | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/awesome/rc.lua b/awesome/rc.lua index 7984cc3..f57eaba 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -313,22 +313,22 @@ globalkeys = awful.util.table.join( awful.key({ modkey, "Shift" }, "q", awesome.quit, {description = "quit awesome", group = "awesome"}), - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, - {description = "increase master width factor", group = "layout"}), - awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, - {description = "decrease master width factor", group = "layout"}), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, - {description = "increase the number of master clients", group = "layout"}), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, - {description = "decrease the number of master clients", group = "layout"}), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, - {description = "increase the number of columns", group = "layout"}), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, - {description = "decrease the number of columns", group = "layout"}), - awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, - {description = "select next", group = "layout"}), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, - {description = "select previous", group = "layout"}), + -- awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, + -- {description = "increase master width factor", group = "layout"}), + -- awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, + -- {description = "decrease master width factor", group = "layout"}), + -- awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, + -- {description = "increase the number of master clients", group = "layout"}), + -- awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, + -- {description = "decrease the number of master clients", group = "layout"}), + -- awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, + -- {description = "increase the number of columns", group = "layout"}), + -- awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, + -- {description = "decrease the number of columns", group = "layout"}), + -- awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, + -- {description = "select next", group = "layout"}), + -- awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, + -- {description = "select previous", group = "layout"}), awful.key({ modkey, "Control" }, "n", function () @@ -392,6 +392,10 @@ globalkeys = awful.util.table.join( naughty.notify({title = options.browser .. " starting..."}) end, {description="start the web browser", group="custom"}), + awful.key({modkey}, "l", function() + os.execute('slock') + end, { description="Locks the screen", group="custom"}), + awful.key({modkey, "Shift"}, "Tab", function() os.execute('xdotool key Caps_Lock') end, {description="switch the caps lock", group="custom"}), @@ -626,3 +630,5 @@ end) client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) -- }}} +-- +os.execute('xautolock -time 10 -locker slock&')