t
This commit is contained in:
parent
b3173e161d
commit
233e2eb8b6
|
@ -32,11 +32,11 @@ pub fn main() !void {
|
||||||
const widgets = [_]*Widget{
|
const widgets = [_]*Widget{
|
||||||
//&Widget.init(&textWidget.New("owo", "potato")), // 4KiB
|
//&Widget.init(&textWidget.New("owo", "potato")), // 4KiB
|
||||||
//&Widget.init(&textWidget.New("uwu", "tomato")), // 4KiB
|
//&Widget.init(&textWidget.New("uwu", "tomato")), // 4KiB
|
||||||
&Widget.init(&cpuWidget.New(&br)), // 4.08KiB
|
//&Widget.init(&cpuWidget.New(&br)), // 4.08KiB
|
||||||
&Widget.init(&memoryWidget.New(&br)), // 4.08KiB
|
&Widget.init(&memoryWidget.New(&br)), // 4.08KiB
|
||||||
&Widget.init(&weatherWidget.New(allocator, &br, @import("build_options").weather_location)), // 16.16KiB
|
//&Widget.init(&weatherWidget.New(allocator, &br, @import("build_options").weather_location)), // 16.16KiB
|
||||||
&Widget.init(&batteryWidget.New(allocator, &br)), // 12.11KiB
|
//&Widget.init(&batteryWidget.New(allocator, &br)), // 12.11KiB
|
||||||
&Widget.init(&timeWidget.New(allocator, &br)), // 32.46KiB
|
//&Widget.init(&timeWidget.New(allocator, &br)), // 32.46KiB
|
||||||
};
|
};
|
||||||
bar.widgets = widgets[0..];
|
bar.widgets = widgets[0..];
|
||||||
try br.start();
|
try br.start();
|
||||||
|
|
|
@ -123,6 +123,7 @@ pub const MemoryWidget = struct {
|
||||||
var text: []const u8 = " ";
|
var text: []const u8 = " ";
|
||||||
|
|
||||||
// And this is why I love the looping counter.
|
// And this is why I love the looping counter.
|
||||||
|
std.debug.print("num: {}\n", .{self.lc});
|
||||||
if (self.lc.get() == 0) {
|
if (self.lc.get() == 0) {
|
||||||
text = try std.fmt.allocPrint(allocator, "{} {}", .{
|
text = try std.fmt.allocPrint(allocator, "{} {}", .{
|
||||||
comptimeColour("accentlight", "mem"),
|
comptimeColour("accentlight", "mem"),
|
||||||
|
@ -168,6 +169,8 @@ pub const MemoryWidget = struct {
|
||||||
comptimeColour("accentlight", "mem buf"),
|
comptimeColour("accentlight", "mem buf"),
|
||||||
kibibytesToMegabytes(memInfo.buffers),
|
kibibytesToMegabytes(memInfo.buffers),
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
unreachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
try self.bar.add(Info{
|
try self.bar.add(Info{
|
||||||
|
|
Loading…
Reference in a new issue