awesomewm floating window
This commit is contained in:
parent
e18a904ee2
commit
6419f21619
|
|
@ -555,12 +555,16 @@ end)
|
||||||
|
|
||||||
local function custommaximizedbutton(c)
|
local function custommaximizedbutton(c)
|
||||||
local widget = awful.titlebar.widget.button(c, "maximized", function(cl)
|
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
|
return not cl.floating and cl.first_tag and awful.layout.get(cl.first_tag.screen) == awful.layout.suit.max
|
||||||
end, function(cl)
|
end, function(cl)
|
||||||
if cl.floating then
|
if cl.floating then
|
||||||
cl.floating = false
|
cl.floating = false
|
||||||
|
if awful.layout.get(cl.first_tag.screen) ~= awful.layout.suit.max then
|
||||||
|
change_layout()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
change_layout()
|
||||||
end
|
end
|
||||||
change_layout()
|
|
||||||
end)
|
end)
|
||||||
local function update()
|
local function update()
|
||||||
if not c.valid then tag.disconnect_signal("property::layout", update)
|
if not c.valid then tag.disconnect_signal("property::layout", update)
|
||||||
|
|
@ -613,6 +617,13 @@ end)
|
||||||
client.connect_signal("mouse::enter", function(c)
|
client.connect_signal("mouse::enter", function(c)
|
||||||
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
||||||
end)
|
end)
|
||||||
|
client.connect_signal("property::floating", function(c)
|
||||||
|
if c.floating then
|
||||||
|
awful.titlebar(c, {bg = "#7d92c6"})
|
||||||
|
else
|
||||||
|
awful.titlebar(c, {bg = beautiful.titlebar_bg_normal})
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue