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,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
{
{
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("core.widgets.menu_launcher"),
--require("widgets.polylauncher")({vertical = false}),
--s.mytaglist,
s.mypromptbox,
require("widgets.current_window")({
style = {
icon_bg_normal = beautiful.topbar_bg
}
}),
spacing = 3
},
-- Middle widget
{
--[[require("widgets.polytasklist")({
vertical = false,
stretch = false,
constraint = 180,
names = true,
margins = 5
})(s),]]
layout = wibox.layout.fixed.horizontal
widget = wibox.container.background
},
{ -- Right widgets
wibox.widget.textclock(),
{
widget = wibox.container.background,
forced_width = (math.abs(s.geometry.width/2)-200)
},
layout = wibox.layout.fixed.horizontal,
awful.widget.keyboardlayout(),
require("widgets.wallpapers")({
@ -135,12 +119,6 @@ awful.screen.connect_for_each_screen(function(s)
icon_bg_normal = beautiful.topbar_bg
}
}),
wibox.widget.textclock(),
require("widgets.username")({
style = {
icon_bg_normal = beautiful.topbar_bg
}
}),
s.mylayoutbox,
spacing = 4
},

View File

@ -88,39 +88,22 @@ return function(c)
return awful.titlebar(c) : setup {
{ -- Left
c.menu_button,
{ -- Title
align = "center",
widget = awful.titlebar.widget.titlewidget(c),
buttons = buttons
},
spacing = 10,
layout = wibox.layout.fixed.horizontal
},
{ -- Middle
{
widget = awful.titlebar.widget.titlewidget(c),
align = "center"
},
buttons = buttons,
layout = wibox.layout.flex.horizontal
},
{ -- Right
{
{
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.minimizebutton (c),
awful.titlebar.widget.closebutton (c),
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
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.minimizebutton (c),
awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal(),
},
layout = wibox.layout.align.horizontal,
}

View File

@ -5,7 +5,7 @@ global = {}
global.awesome_dir = os.getenv("HOME").."/.config/awesome/"
global.config_dir = os.getenv("HOME").."/.awesome/"
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.editor = os.getenv("EDITOR") or "vim"
global.editor_cmd = global.terminal .. " -e ".. global.editor

View File

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

View File

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