lazy push before updates

This commit is contained in:
Noella
2025-12-30 13:23:54 -07:00
parent 44ab8019bc
commit 34b678e020
30 changed files with 727 additions and 208 deletions

View File

@@ -0,0 +1,17 @@
local awful = require("awful")
local wibox = require("wibox")
return function(s)
local widgets = require("statusbar.bottom.widgets")
-- Create the wibox
s.bottom_wibox = awful.wibar({ position = "bottom", screen = s })
-- Add widgets to the wibox
s.bottom_wibox:setup({
layout = wibox.layout.align.horizontal,
s.taglist, -- Left widgets
nil,
widgets(s)
})
end

View File

@@ -0,0 +1,33 @@
local wibox = require("wibox")
local widgets = require("widgets")
local _M = {}
_M.battery_widget = widgets.battery(false)
_M.volume_widget = widgets.volume()
function _M.get()
return {
layout = wibox.layout.fixed.horizontal,
spacing = 7,
spacing_widget = wibox.widget.separator({
orientation = "vertical",
color = "#333",
thickness = 2,
span_ratio = 0.75,
}),
_M.volume_widget,
_M.battery_widget,
widgets.text_clock(),
}
end
function _M.get_battery_widget()
return _M.battery_widget
end
return setmetatable(_M, {
__call = function(_, ...)
return _M.get(...)
end,
})

View File

@@ -0,0 +1,17 @@
local awful = require("awful")
local wibox = require("wibox")
local widgets = require("statusbar.top.widgets")
return function(s)
-- Create the wibox
s.top_wibox = awful.wibar({ position = "top", screen = s })
-- Add widgets to the wibox
s.top_wibox:setup({
layout = wibox.layout.align.horizontal,
nil,
s.tasklist, -- Middle widget
widgets(s), -- Right widgets
})
end

19
statusbar/top/widgets.lua Normal file
View File

@@ -0,0 +1,19 @@
local wibox = require("wibox")
local separator = require("widgets.separator")
local _M = {}
function _M.get(s)
return {
layout = wibox.layout.fixed.horizontal,
wibox.widget.systray(),
separator,
s.layoutbox,
}
end
return setmetatable({}, {
__call = function(_, ...)
return _M.get(...)
end,
})