Add auto unmaximize/unminimize on manage
This commit is contained in:
parent
177fc422c5
commit
4059d875e7
|
@ -20,6 +20,13 @@ client.connect_signal("manage", function (c)
|
||||||
awful.placement.no_offscreen(c)
|
awful.placement.no_offscreen(c)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Unminimize and unmaximize the other clients
|
||||||
|
for _, o in ipairs(client.get()) do
|
||||||
|
o.minimized = false
|
||||||
|
o.maximized = false
|
||||||
|
o.fullscreen = false
|
||||||
|
end
|
||||||
|
|
||||||
gears.timer.delayed_call(function()
|
gears.timer.delayed_call(function()
|
||||||
local geometry = c:geometry()
|
local geometry = c:geometry()
|
||||||
local x = geometry.x + geometry.width/2
|
local x = geometry.x + geometry.width/2
|
||||||
|
@ -41,7 +48,7 @@ collectgarbage("setstepmul", 1000)
|
||||||
|
|
||||||
client.connect_signal("property::maximized", function(focused)
|
client.connect_signal("property::maximized", function(focused)
|
||||||
local hide = focused.maximized or focused.fullscreen
|
local hide = focused.maximized or focused.fullscreen
|
||||||
for i, c in ipairs(client.get()) do
|
for _, c in ipairs(client.get()) do
|
||||||
if not c.floating and c.screen == focused.screen and c.first_tag == focused.first_tag then
|
if not c.floating and c.screen == focused.screen and c.first_tag == focused.first_tag then
|
||||||
c.minimized = hide
|
c.minimized = hide
|
||||||
end
|
end
|
||||||
|
@ -52,7 +59,7 @@ end)
|
||||||
|
|
||||||
client.connect_signal("unmanage", function(unmanaged)
|
client.connect_signal("unmanage", function(unmanaged)
|
||||||
if unmanaged.maximized then
|
if unmanaged.maximized then
|
||||||
for i, c in ipairs(client.get()) do
|
for _, c in ipairs(client.get()) do
|
||||||
if not c.floating and c.screen == unmanaged.screen then
|
if not c.floating and c.screen == unmanaged.screen then
|
||||||
c.minimized = false
|
c.minimized = false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue