From 8ab133d7ea3ade54b85f42eaf4b9d6ef244c5ee0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 14 Nov 2021 15:14:47 +0100 Subject: bindings: add a binding for toggling the current randr output --- bindings.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bindings.lua b/bindings.lua index b4da23f..8e08aee 100644 --- a/bindings.lua +++ b/bindings.lua @@ -14,6 +14,14 @@ function M.create(workspace) awful.key({ modkey, "Mod1" }, "Delete", awesome.restart), awful.key({ modkey }, "Pause", utils.screen_lock), awful.key({ }, "XF86ScreenSaver", utils.screen_lock), + awful.key({ modkey, }, "Insert", + function () + local s = mouse.screen + for o, _ in pairs(s.outputs) do + print('toggling ' .. o) + awful.spawn('randr_output_toggle ' .. o) + end + 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 -- cgit v1.2.3