local titlebars_enabled = true
if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
-- buttons for the titlebar
local buttons = awful.util.table.join(
awful.button({ }, 1, function()
client.focus = c
c:raise()
awful.mouse.client.move(c)
end),
awful.button({ }, 3, function()
client.focus = c
c:raise()
awful.mouse.client.resize(c)
end)
)
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(awful.titlebar.widget.iconwidget(c))
left_layout:buttons(buttons)
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.horizontal()
right_layout:add(awful.titlebar.widget.floatingbutton(c))
right_layout:add(awful.titlebar.widget.maximizedbutton(c))
right_layout:add(awful.titlebar.widget.stickybutton(c))
right_layout:add(awful.titlebar.widget.ontopbutton(c))
right_layout:add(awful.titlebar.widget.closebutton(c))
-- The title goes in the middle
local middle_layout = wibox.layout.flex.horizontal()
local title = awful.titlebar.widget.titlewidget(c)
title:set_align("center")
middle_layout:add(title)
middle_layout:buttons(buttons)
-- Now bring it all together
local layout = wibox.layout.align.horizontal()
layout:set_left(left_layout)
layout:set_right(right_layout)
layout:set_middle(middle_layout)
awful.titlebar(c):set_widget(layout)
end
end)
сам пробовал добавлять чтото.. ошибки каждый раз были
подскажи как поправить чтоб только текст повернуть?
-- The title goes in the middle
local middle_layout = wibox.layout.flex.horizontal()
local title = awful.titlebar.widget.titlewidget(c)
title:set_align("center")
middle_layout:add(title)
middle_layout:buttons(buttons)
-- Now bring it all together
local layout = wibox.layout.align.vertical()
layout:set_top(left_layout)
layout:set_bottom(right_layout)
layout.rotate:set_middle(middle_layout)
awful.titlebar(c, { position = 'left' }):set_widget(layout)
end
end)
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.vertical()
left_layout:add(awful.titlebar.widget.iconwidget(c))
left_layout:buttons(buttons)
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.vertical()
right_layout:add(awful.titlebar.widget.floatingbutton(c))
right_layout:add(awful.titlebar.widget.maximizedbutton(c))
right_layout:add(awful.titlebar.widget.stickybutton(c))
right_layout:add(awful.titlebar.widget.ontopbutton(c))
right_layout:add(awful.titlebar.widget.closebutton(c))
-- The title goes in the middle
local middle_layout = wibox.layout.flex.vertical()
local title = awful.titlebar.widget.titlewidget(c)
title:set_align("center")
middle_layout:add(wibox.layout.rotate(title, "east"))
middle_layout:buttons(buttons)
-- Now bring it all together
local layout = wibox.layout.align.vertical()
layout:set_top(left_layout)
layout:set_bottom(right_layout)
layout:set_middle(middle_layout)
awful.titlebar(c, { position = 'left' }):set_widget(layout)
Я когда-то их специально убирал. Сейчас пришел к выводу, что для меня удобнее, чтобы они были, пока окно не развернуто на весь экран. Как только окно максимизировано, тайтл бар должен исчезнуть.