Fixed the titlebar in presets

This commit is contained in:
Yessiest 2021-12-16 21:28:17 +04:00
parent fda61f4a86
commit aa869a5c9e
5 changed files with 20 additions and 67 deletions

View File

@ -75,38 +75,22 @@ awful.screen.connect_for_each_screen(function(s)
layout = wibox.layout.align.horizontal, layout = wibox.layout.align.horizontal,
{ -- Left widgets { -- Left widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
{
{
require("core.widgets.menu_launcher"), require("core.widgets.menu_launcher"),
widget = wibox.container.place,
halign = "center"
},
bg = "#26262633",
widget = wibox.container.background,
forced_width = require("beautiful.xresources").apply_dpi(61),
},
--require("widgets.polylauncher")({vertical = false}), --require("widgets.polylauncher")({vertical = false}),
--s.mytaglist, --s.mytaglist,
s.mypromptbox, s.mypromptbox,
require("widgets.current_window")({
style = {
icon_bg_normal = beautiful.topbar_bg
}
}),
spacing = 3 spacing = 3
}, },
-- Middle widget -- Middle widget
{ {
--[[require("widgets.polytasklist")({ widget = wibox.container.background
vertical = false,
stretch = false,
constraint = 180,
names = true,
margins = 5
})(s),]]
layout = wibox.layout.fixed.horizontal
}, },
{ -- Right widgets { -- Right widgets
wibox.widget.textclock(),
{
widget = wibox.container.background,
forced_width = (math.abs(s.geometry.width/2)-200)
},
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
awful.widget.keyboardlayout(), awful.widget.keyboardlayout(),
require("widgets.wallpapers")({ require("widgets.wallpapers")({
@ -135,12 +119,6 @@ awful.screen.connect_for_each_screen(function(s)
icon_bg_normal = beautiful.topbar_bg icon_bg_normal = beautiful.topbar_bg
} }
}), }),
wibox.widget.textclock(),
require("widgets.username")({
style = {
icon_bg_normal = beautiful.topbar_bg
}
}),
s.mylayoutbox, s.mylayoutbox,
spacing = 4 spacing = 4
}, },

View File

@ -88,39 +88,22 @@ return function(c)
return awful.titlebar(c) : setup { return awful.titlebar(c) : setup {
{ -- Left { -- Left
c.menu_button, c.menu_button,
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c),
buttons = buttons
},
spacing = 10, spacing = 10,
layout = wibox.layout.fixed.horizontal layout = wibox.layout.fixed.horizontal
}, },
{ -- Middle { -- Middle
{
widget = awful.titlebar.widget.titlewidget(c),
align = "center"
},
buttons = buttons, buttons = buttons,
layout = wibox.layout.flex.horizontal layout = wibox.layout.flex.horizontal
}, },
{ -- Right { -- Right
{
{
awful.titlebar.widget.maximizedbutton(c), awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.minimizebutton (c), awful.titlebar.widget.minimizebutton (c),
awful.titlebar.widget.closebutton (c), awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal(), layout = wibox.layout.fixed.horizontal(),
widget = wibox.container.margin,
margins = 3
},
widget = wibox.container.background,
shape = gears.shape.rounded_bar,
bg = {
type = "linear",
from = { 0, 15 },
to = { 0, 0},
stops = { { 0, "#5d5d5955"} , {1, "39383555"} }
},
},
widget = wibox.container.margin,
margins = 2
}, },
layout = wibox.layout.align.horizontal, layout = wibox.layout.align.horizontal,
} }

View File

@ -5,7 +5,7 @@ global = {}
global.awesome_dir = os.getenv("HOME").."/.config/awesome/" global.awesome_dir = os.getenv("HOME").."/.config/awesome/"
global.config_dir = os.getenv("HOME").."/.awesome/" global.config_dir = os.getenv("HOME").."/.awesome/"
global.themes_dir = os.getenv("HOME").."/.config/awesome/themes/" global.themes_dir = os.getenv("HOME").."/.config/awesome/themes/"
global.theme = global.awesome_dir .. "themes/unity/theme.lua" global.theme = global.awesome_dir .. "themes/unity2/theme.lua"
global.terminal = "xterm" global.terminal = "xterm"
global.editor = os.getenv("EDITOR") or "vim" global.editor = os.getenv("EDITOR") or "vim"
global.editor_cmd = global.terminal .. " -e ".. global.editor global.editor_cmd = global.terminal .. " -e ".. global.editor

View File

@ -88,15 +88,10 @@ return function(c)
return awful.titlebar(c) : setup { return awful.titlebar(c) : setup {
{ -- Left { -- Left
c.menu_button, c.menu_button,
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c),
buttons = buttons
},
spacing = 10,
layout = wibox.layout.fixed.horizontal layout = wibox.layout.fixed.horizontal
}, },
{ -- Middle { -- Middle
awful.titlebar.widget.titlewidget(c),
buttons = buttons, buttons = buttons,
layout = wibox.layout.flex.horizontal layout = wibox.layout.flex.horizontal
}, },
@ -122,6 +117,7 @@ return function(c)
widget = wibox.container.margin, widget = wibox.container.margin,
margins = 2 margins = 2
}, },
spacing = 10,
layout = wibox.layout.align.horizontal, layout = wibox.layout.align.horizontal,
} }
end end

View File

@ -88,15 +88,10 @@ return function(c)
return awful.titlebar(c) : setup { return awful.titlebar(c) : setup {
{ -- Left { -- Left
c.menu_button, c.menu_button,
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c),
buttons = buttons
},
spacing = 10,
layout = wibox.layout.fixed.horizontal layout = wibox.layout.fixed.horizontal
}, },
{ -- Middle { -- Middle
awful.titlebar.widget.titlewidget(c),
buttons = buttons, buttons = buttons,
layout = wibox.layout.flex.horizontal layout = wibox.layout.flex.horizontal
}, },
@ -106,6 +101,7 @@ return function(c)
awful.titlebar.widget.closebutton (c), awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal(), layout = wibox.layout.fixed.horizontal(),
}, },
spacing = 10,
layout = wibox.layout.align.horizontal, layout = wibox.layout.align.horizontal,
} }
end end