summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bindings.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/bindings.lua b/bindings.lua
index 878e58c..559b5d3 100644
--- a/bindings.lua
+++ b/bindings.lua
@@ -14,6 +14,17 @@ function M.create(workspace)
awful.key({ modkey }, "Pause", function () awful.spawn("xscreensaver-command -lock") end),
awful.key({ modkey }, "XF86ScreenSaver", function () awful.spawn("xscreensaver-command -lock") end),
+ -- something of a hack: diziet is configured to send F13/XF86Tools on lid close
+ -- this should trigger a screen lock if HDMI cable is not connected
+ awful.key({ }, "XF86Tools",
+ function ()
+ awful.spawn.with_shell("cat /sys/class/drm/card0/*HDMI*/status|grep -q '^connected' || xscreensaver-command -suspend")
+ end),
+ awful.key({ }, "XF86Launch5",
+ function ()
+ awful.spawn.with_shell("xscreensaver-command -deactivate")
+ end),
+
-- program launching
awful.key({ modkey, }, "t", function () utils.spawn_current(commondefs.terminal) end),
awful.key({ modkey, }, "v", function () utils.spawn_current(commondefs.terminal .. " -e alsamixer") end),