pass: no lid counter

This commit is contained in:
RadsammyT 2026-03-21 11:36:00 -04:00
commit bf678017ff
No known key found for this signature in database
3 changed files with 1 additions and 5 deletions

View file

@ -19,8 +19,6 @@ calculate_timeout_fn: ?*const fn (*Label, *anyopaque) anyerror!?usize,
component_pos: Position,
children_pos: Position,
pub var lidCounter: u64 = 0;
pub fn init(
text: []const u8,
max_width: ?usize,
@ -29,7 +27,6 @@ pub fn init(
update_fn: ?*const fn (*Label, *anyopaque) anyerror!void,
calculate_timeout_fn: ?*const fn (*Label, *anyopaque) anyerror!?usize,
) Label {
lidCounter += 1;
return .{
.instance = null,
.allocator = null,

View file

@ -12,7 +12,7 @@ pub const UNDEFINED_CMD: []const u8 = "echo \"You forgot to define 'cmd'!\"";
pub const CustomCommandInfo = struct {
name: []const u8 = "",
cmd: ?[]const u8 = null,
/// To be set to the label widget's `lid`
/// To be set to the label's widget ID
id: u64 = 0,
/// In frames, the refresh rate for the `cmd` to run again

View file

@ -225,7 +225,6 @@ pub fn main() !void {
custom.labels = .init(state.allocator);
var config_parser = try IniParser(Config).init(state.allocator, config_path, migrator.configFieldHandler);
defer config_parser.deinit();
// mapping.deinit() has to be done here
defer {
if (!shutdown or !restart) {
var iter = custom.binds.iterator();