From 4059d875e74bdbe8c43d77fe897de5fa5a75f70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Sat, 26 Aug 2023 01:19:13 +0200 Subject: [PATCH] Add auto unmaximize/unminimize on manage --- awesome/utils/signals.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/awesome/utils/signals.lua b/awesome/utils/signals.lua index b50b126..fc79fa3 100644 --- a/awesome/utils/signals.lua +++ b/awesome/utils/signals.lua @@ -20,6 +20,13 @@ client.connect_signal("manage", function (c) awful.placement.no_offscreen(c) 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() local geometry = c:geometry() local x = geometry.x + geometry.width/2 @@ -41,7 +48,7 @@ collectgarbage("setstepmul", 1000) client.connect_signal("property::maximized", function(focused) 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 c.minimized = hide end @@ -52,7 +59,7 @@ end) client.connect_signal("unmanage", function(unmanaged) 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 c.minimized = false end