summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-11-14 15:14:47 +0100
committerAnton Khirnov <anton@khirnov.net>2021-11-14 15:14:47 +0100
commit8ab133d7ea3ade54b85f42eaf4b9d6ef244c5ee0 (patch)
treed703dfe9d93647fb57c3079a2b5845620edd81bb
parent2871a334784feedbdd853feb83feabb4645e18af (diff)
bindings: add a binding for toggling the current randr output
-rw-r--r--bindings.lua8
1 files changed, 8 insertions, 0 deletions
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