summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-12-02 18:06:14 +0100
committerAnton Khirnov <anton@khirnov.net>2020-12-02 18:06:14 +0100
commitca2f901197dd36520cc6de31aa1d4277caf72d6d (patch)
tree3a7dac8b47182ac753aaf00d3810cda35fd30882
parent78443ad0af1562523ff8d5910bc288a7d158c496 (diff)
bindings: add keys for switching to empty page on given desk
-rw-r--r--bindings.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/bindings.lua b/bindings.lua
index faf133d..1e6e03c 100644
--- a/bindings.lua
+++ b/bindings.lua
@@ -198,6 +198,15 @@ function M.create(workspace)
workspace:view(screen, i)
end),
+ -- View empty (or first) page on desktop <i>
+ awful.key({ modkey, "Control" }, "#" .. keycode,
+ function ()
+ local screen = mouse.screen
+ local desk = workspace.desktops[i]
+ local page_idx = desk:find_empty_page() or 1
+ workspace:view(screen, i, page_idx)
+ end),
+
-- Move focused client to empty (or first, if all non-empty)
-- page on desktop <i>
awful.key({ modkey, "Shift" }, "#" .. keycode,