Created
October 5, 2020 12:52
Revisions
-
erikLundstedt created this gist
Oct 5, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,53 @@ --https://www.reddit.com/r/awesomewm/comments/h07f5y/does_awesome_support_window_swallowing/ function isFood(c) if (c.class and c.class:match("Vivaldi-stable")) and true or false then notify("vivaldi") return true elseif( c.class and c.class:match("kitty")) and true or false then notify("kitty") return true else return (c.class and c.class:match("kitty") or c.class:match("Vivaldi-stable")) and true or false end end function copySize(c, parent_client) if not c or not parent_client then return end if not c.valid or not parent_client.valid then return end c.x=parent_client.x; c.y=parent_client.y; c.width=parent_client.width; c.height=parent_client.height; end function check_resize_client(c) if(c.child_resize) then copy_size(c.child_resize, c) end end client.connect_signal("property::size", check_resize_client) client.connect_signal("property::position", check_resize_client) client.connect_signal("manage", function(c) if isFood(c) then return end local parent_client=awful.client.focus.history.get(c.screen, 1) if parent_client and isFood(parent_client) then parent_client.minimized = true c.floating=false c.fullscreen = not c.fullscreen c:raise() c:connect_signal("unmanage", function() parent_client.minimized = false end) -- c.floating=true -- copy_size(c, parent_client) end end)