Merge pull request #7 from JavaCafe01/master

Added other titlebar buttons
This commit is contained in:
Nooo37 2020-11-24 10:38:38 +01:00 committed by GitHub
commit faad1ebb63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -92,6 +92,13 @@ local function create(c, focused_bool, buttons)
local close = create_title_button(c, close_color, bg_normal) local close = create_title_button(c, close_color, bg_normal)
close:connect_signal("button::press", function() c:kill() end) close:connect_signal("button::press", function() c:kill() end)
local floating = create_title_button(c, float_color, bg_normal)
floating:connect_signal("button::press",
function() c.floating = not c.floating end)
local min = create_title_button(c, min_color, bg_normal)
min:connect_signal("button::press", function() c.minimized = true end)
if focused_bool then if focused_bool then
tab_content = wibox.widget { tab_content = wibox.widget {
{ {
@ -103,7 +110,7 @@ local function create(c, focused_bool, buttons)
}, },
text_temp, text_temp,
{ {
{close, layout = wibox.layout.fixed.horizontal}, {min, floating, close, layout = wibox.layout.fixed.horizontal},
top = dpi(10), top = dpi(10),
right = dpi(10), right = dpi(10),
bottom = dpi(10), bottom = dpi(10),