Added lock screen

This commit is contained in:
Thomas FORGIONE 2017-02-10 17:12:54 +01:00
parent 48fbba5ce2
commit 9b65182eec
No known key found for this signature in database
GPG Key ID: 2A210FFC062E00C3
1 changed files with 22 additions and 16 deletions

View File

@ -313,22 +313,22 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, "Shift" }, "q", awesome.quit, awful.key({ modkey, "Shift" }, "q", awesome.quit,
{description = "quit awesome", group = "awesome"}), {description = "quit awesome", group = "awesome"}),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, -- awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
{description = "increase master width factor", group = "layout"}), -- {description = "increase master width factor", group = "layout"}),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, -- awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
{description = "decrease master width factor", group = "layout"}), -- {description = "decrease master width factor", group = "layout"}),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, -- awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
{description = "increase the number of master clients", group = "layout"}), -- {description = "increase the number of master clients", group = "layout"}),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, -- awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
{description = "decrease the number of master clients", group = "layout"}), -- {description = "decrease the number of master clients", group = "layout"}),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, -- awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
{description = "increase the number of columns", group = "layout"}), -- {description = "increase the number of columns", group = "layout"}),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, -- awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
{description = "decrease the number of columns", group = "layout"}), -- {description = "decrease the number of columns", group = "layout"}),
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, -- awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
{description = "select next", group = "layout"}), -- {description = "select next", group = "layout"}),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, -- awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
{description = "select previous", group = "layout"}), -- {description = "select previous", group = "layout"}),
awful.key({ modkey, "Control" }, "n", awful.key({ modkey, "Control" }, "n",
function () function ()
@ -392,6 +392,10 @@ globalkeys = awful.util.table.join(
naughty.notify({title = options.browser .. " starting..."}) naughty.notify({title = options.browser .. " starting..."})
end, {description="start the web browser", group="custom"}), 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() awful.key({modkey, "Shift"}, "Tab", function()
os.execute('xdotool key Caps_Lock') os.execute('xdotool key Caps_Lock')
end, {description="switch the caps lock", group="custom"}), 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("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}} -- }}}
--
os.execute('xautolock -time 10 -locker slock&')