Better task switcher

This commit is contained in:
Daan Vanoverloop 2019-10-16 20:29:00 +02:00
parent 20a11a6baf
commit a8916b3694
1 changed files with 15 additions and 1 deletions

View File

@ -524,6 +524,7 @@ function start_switcher ()
for _, tag in ipairs(root.tags()) do
layout_table[tag] = tag.layout
tag.layout = switcher_layout
tag.selected = true
end
-- Enable all bars
@ -546,6 +547,9 @@ function end_switcher ()
-- Restore layout of all tags
for _, tag in ipairs(root.tags()) do
tag.layout = layout_table[tag]
if tag ~= client.focus.first_tag then
tag.selected = false
end
end
-- Set the master window
@ -790,6 +794,12 @@ clientkeys = gears.table.join(
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, "Control", "Shift" }, "space", function (c)
c.maximized = false
c.maximized_vertical = false
c.maximized_horizontal = false
end,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
{description = "move to master", group = "client"}),
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
@ -891,7 +901,11 @@ awful.rules.rules = {
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
placement = awful.placement.no_overlap+awful.placement.no_offscreen,
maximized_vertical = false,
maximized_horizontal = false,
floating = false,
maximized = false
}
},