diff --git a/.config/awesome/ui/top-panel/config.lua b/.config/awesome/ui/top-panel/config.lua new file mode 100644 index 0000000..7f03189 --- /dev/null +++ b/.config/awesome/ui/top-panel/config.lua @@ -0,0 +1,13 @@ +local beautiful = require("beautiful") + +local theme = beautiful.get() +local dpi = beautiful.xresources.apply_dpi + +local M = { + margin = theme.useless_gap * 2, + padding = theme.useless_gap / 1.5, +} + +M.height = (M.padding * 2) + dpi(20) + +return M diff --git a/.config/awesome/ui/top-panel/init.lua b/.config/awesome/ui/top-panel/init.lua index 0f05949..dcc0191 100644 --- a/.config/awesome/ui/top-panel/init.lua +++ b/.config/awesome/ui/top-panel/init.lua @@ -2,6 +2,7 @@ local awful = require("awful") local wibox = require("wibox") local widgets = require("ui.top-panel.widgets") local beautiful = require("beautiful") +local vars = require("ui.top-panel.config") local theme = beautiful.get() local dpi = beautiful.xresources.apply_dpi @@ -26,6 +27,14 @@ screen.connect_signal("request::desktop_decoration", function(s) s.mywibox = awful.wibar({ position = "top", screen = s, + margins = { + top = vars.margin, + right = vars.margin, + left = vars.margin, + }, + border_width = theme.border_width, + border_color = theme.border_normal, + height = vars.height, widget = { layout = wibox.layout.align.horizontal, @@ -39,10 +48,10 @@ screen.connect_signal("request::desktop_decoration", function(s) widgets.seperator, tasklist, }, - left = dpi(5), + left = theme.useless_gap, right = 0, - top = dpi(2), - bottom = dpi(2), + top = vars.padding, + bottom = vars.padding, layout = wibox.container.margin, }, { @@ -52,8 +61,8 @@ screen.connect_signal("request::desktop_decoration", function(s) }, left = 0, right = 0, - top = dpi(1), - bottom = dpi(1), + top = vars.padding, + bottom = vars.padding, layout = wibox.container.margin, }, { -- Right widgets @@ -68,18 +77,11 @@ screen.connect_signal("request::desktop_decoration", function(s) widgets.layoutbox, }, left = 0, - right = dpi(2), - top = dpi(1), - bottom = dpi(1), + right = theme.useless_gap, + top = vars.padding, + bottom = vars.padding, layout = wibox.container.margin, }, }, }) - - s.border2 = awful.wibar({ - position = "top", - screen = s, - bg = theme.color.surface0, - height = dpi(2), - }) end) diff --git a/.config/awesome/ui/top-panel/widgets/taglist.lua b/.config/awesome/ui/top-panel/widgets/taglist.lua index a37c489..01d5383 100644 --- a/.config/awesome/ui/top-panel/widgets/taglist.lua +++ b/.config/awesome/ui/top-panel/widgets/taglist.lua @@ -3,6 +3,7 @@ local wibox = require("wibox") local beautiful = require("beautiful") local bling = require("lib.bling") local keys = require("config").keys +local vars = require("ui.top-panel.config") local theme = beautiful.get() local dpi = beautiful.xresources.apply_dpi @@ -97,8 +98,8 @@ awful.screen.connect_for_each_screen(function(s) placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y) awful.placement.top_left(c, { margins = { - top = dpi(31), - left = 0, + top = vars.height + (vars.margin * 1.5), + left = vars.margin, }, }) end,