update awesomewm maximize button
This commit is contained in:
parent
9e33f85778
commit
e18a904ee2
|
|
@ -553,6 +553,22 @@ client.connect_signal("manage", function (c)
|
|||
end
|
||||
end)
|
||||
|
||||
local function custommaximizedbutton(c)
|
||||
local widget = awful.titlebar.widget.button(c, "maximized", function(cl)
|
||||
return cl.first_tag and awful.layout.get(cl.first_tag.screen) == awful.layout.suit.max
|
||||
end, function(cl)
|
||||
if cl.floating then
|
||||
cl.floating = false
|
||||
end
|
||||
change_layout()
|
||||
end)
|
||||
local function update()
|
||||
if not c.valid then tag.disconnect_signal("property::layout", update)
|
||||
else widget.update() end
|
||||
end
|
||||
tag.connect_signal("property::layout", update)
|
||||
return widget
|
||||
end
|
||||
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||
client.connect_signal("request::titlebars", function(c)
|
||||
-- buttons for the titlebar
|
||||
|
|
@ -585,7 +601,7 @@ client.connect_signal("request::titlebars", function(c)
|
|||
},
|
||||
{ -- Right
|
||||
awful.titlebar.widget.minimizebutton (c),
|
||||
awful.titlebar.widget.maximizedbutton(c),
|
||||
custommaximizedbutton (c),
|
||||
awful.titlebar.widget.closebutton (c),
|
||||
layout = wibox.layout.fixed.horizontal()
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue