awesome fix
This commit is contained in:
parent
016e54ff34
commit
6ff1a2241d
|
@ -507,12 +507,19 @@ root.buttons(gears.table.join(
|
||||||
))
|
))
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
function table.copy(t)
|
||||||
|
local u = { }
|
||||||
|
for k, v in pairs(t) do u[k] = v end
|
||||||
|
return setmetatable(u, getmetatable(t))
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
switcher_layout = awful.layout.suit.fair
|
switcher_layout = awful.layout.suit.fair
|
||||||
switcher_mode = false
|
switcher_mode = false
|
||||||
switcher_timer = timer({ timeout = 1 })
|
switcher_timer = timer({ timeout = 1 })
|
||||||
switcher_timer:connect_signal("timeout", function () end_switcher() end)
|
switcher_timer:connect_signal("timeout", function () end_switcher() end)
|
||||||
layout_table = {}
|
layout_table = {}
|
||||||
|
previous_tags = {}
|
||||||
|
|
||||||
function start_switcher ()
|
function start_switcher ()
|
||||||
if switcher_timer.started then switcher_timer:stop() end
|
if switcher_timer.started then switcher_timer:stop() end
|
||||||
|
@ -531,6 +538,7 @@ function start_switcher ()
|
||||||
for s in screen do
|
for s in screen do
|
||||||
s.topwibox.visible = true
|
s.topwibox.visible = true
|
||||||
s.bottomwibox.visible = true
|
s.bottomwibox.visible = true
|
||||||
|
for k,v in pairs(s.selected_tags) do table.insert(previous_tags, v) end
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, c in ipairs(client.get()) do
|
for _, c in ipairs(client.get()) do
|
||||||
|
@ -547,18 +555,23 @@ function end_switcher ()
|
||||||
-- Restore layout of all tags
|
-- Restore layout of all tags
|
||||||
for _, tag in ipairs(root.tags()) do
|
for _, tag in ipairs(root.tags()) do
|
||||||
tag.layout = layout_table[tag]
|
tag.layout = layout_table[tag]
|
||||||
if tag ~= client.focus.first_tag then
|
if client.focus and tag ~= client.focus.first_tag or client.focus == nil then
|
||||||
tag.selected = false
|
tag.selected = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set the master window
|
-- Set the master window
|
||||||
for _, c in ipairs(client.get()) do
|
for _, c in ipairs(client.get()) do
|
||||||
remove_borders(c)
|
remove_borders(c)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set focused client as master
|
-- Set focused client as master
|
||||||
if client.focus then client.focus:swap(awful.client.getmaster()) end
|
if client.focus then
|
||||||
|
client.focus:swap(awful.client.getmaster())
|
||||||
|
else
|
||||||
|
for _, tag in ipairs(previous_tags) do
|
||||||
|
tag.selected = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Disable all bars
|
-- Disable all bars
|
||||||
for s in screen do
|
for s in screen do
|
||||||
|
@ -566,6 +579,8 @@ function end_switcher ()
|
||||||
s.bottomwibox.visible = false
|
s.bottomwibox.visible = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
previous_tags = {}
|
||||||
|
|
||||||
--rofi_kill()
|
--rofi_kill()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue