statusbar/src/module.zig
2024-03-15 18:30:35 -06:00

30 lines
785 B
Zig

const std = @import("std");
pub const JSON = struct {
full_text: []const u8,
short_text: ?[]const u8 = null,
color: ?[]const u8 = null,
background: ?[]const u8 = null,
border: ?[]const u8 = null,
border_top: ?u16 = null,
border_right: ?u16 = null,
border_bottom: ?u16 = null,
border_left: ?u16 = null,
min_width: ?u16 = null,
@"align": ?[]const u8 = null,
name: ?[]const u8 = null,
instance: ?[]const u8 = null,
urgent: ?bool = null,
separator: ?bool = null,
separator_block_width: ?u16 = null,
markup: ?[]const u8 = null,
};
const Self = @This();
allocator: std.mem.Allocator,
getJsonFn: *const fn (*const Self) anyerror!JSON,
pub fn getJson(self: *const Self) anyerror!JSON {
return self.getJsonFn(self);
}