💄 feat(awesome): Top-panel adjustments
This commit is contained in:
parent
428d526588
commit
e36f3e67af
3 changed files with 33 additions and 17 deletions
13
.config/awesome/ui/top-panel/config.lua
Normal file
13
.config/awesome/ui/top-panel/config.lua
Normal file
|
@ -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
|
|
@ -2,6 +2,7 @@ local awful = require("awful")
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
local widgets = require("ui.top-panel.widgets")
|
local widgets = require("ui.top-panel.widgets")
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
|
local vars = require("ui.top-panel.config")
|
||||||
|
|
||||||
local theme = beautiful.get()
|
local theme = beautiful.get()
|
||||||
local dpi = beautiful.xresources.apply_dpi
|
local dpi = beautiful.xresources.apply_dpi
|
||||||
|
@ -26,6 +27,14 @@ screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
s.mywibox = awful.wibar({
|
s.mywibox = awful.wibar({
|
||||||
position = "top",
|
position = "top",
|
||||||
screen = s,
|
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 = {
|
widget = {
|
||||||
layout = wibox.layout.align.horizontal,
|
layout = wibox.layout.align.horizontal,
|
||||||
|
@ -39,10 +48,10 @@ screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
widgets.seperator,
|
widgets.seperator,
|
||||||
tasklist,
|
tasklist,
|
||||||
},
|
},
|
||||||
left = dpi(5),
|
left = theme.useless_gap,
|
||||||
right = 0,
|
right = 0,
|
||||||
top = dpi(2),
|
top = vars.padding,
|
||||||
bottom = dpi(2),
|
bottom = vars.padding,
|
||||||
layout = wibox.container.margin,
|
layout = wibox.container.margin,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -52,8 +61,8 @@ screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
},
|
},
|
||||||
left = 0,
|
left = 0,
|
||||||
right = 0,
|
right = 0,
|
||||||
top = dpi(1),
|
top = vars.padding,
|
||||||
bottom = dpi(1),
|
bottom = vars.padding,
|
||||||
layout = wibox.container.margin,
|
layout = wibox.container.margin,
|
||||||
},
|
},
|
||||||
{ -- Right widgets
|
{ -- Right widgets
|
||||||
|
@ -68,18 +77,11 @@ screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
widgets.layoutbox,
|
widgets.layoutbox,
|
||||||
},
|
},
|
||||||
left = 0,
|
left = 0,
|
||||||
right = dpi(2),
|
right = theme.useless_gap,
|
||||||
top = dpi(1),
|
top = vars.padding,
|
||||||
bottom = dpi(1),
|
bottom = vars.padding,
|
||||||
layout = wibox.container.margin,
|
layout = wibox.container.margin,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
s.border2 = awful.wibar({
|
|
||||||
position = "top",
|
|
||||||
screen = s,
|
|
||||||
bg = theme.color.surface0,
|
|
||||||
height = dpi(2),
|
|
||||||
})
|
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -3,6 +3,7 @@ local wibox = require("wibox")
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
local bling = require("lib.bling")
|
local bling = require("lib.bling")
|
||||||
local keys = require("config").keys
|
local keys = require("config").keys
|
||||||
|
local vars = require("ui.top-panel.config")
|
||||||
|
|
||||||
local theme = beautiful.get()
|
local theme = beautiful.get()
|
||||||
local dpi = beautiful.xresources.apply_dpi
|
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)
|
placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y)
|
||||||
awful.placement.top_left(c, {
|
awful.placement.top_left(c, {
|
||||||
margins = {
|
margins = {
|
||||||
top = dpi(31),
|
top = vars.height + (vars.margin * 1.5),
|
||||||
left = 0,
|
left = vars.margin,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue