From 81a17f2904808bfc9516541a956b7f6d9e95099b Mon Sep 17 00:00:00 2001 From: ebits Date: Sat, 11 Oct 2025 08:47:13 +0200 Subject: [PATCH] Fix: Default battery status to row 1 when hide_key_hints and hide_version_string is true (fixes #844) (#845) Default battery status behaviour to usize 0 when hide_key_hints and hide_version_string is true as a fix to issue [#844](https://codeberg.org/fairyglade/ly/issues/844) Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/845 Reviewed-by: AnErrupTion Co-authored-by: ebits Co-committed-by: ebits --- src/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 3b71540..9060222 100644 --- a/src/main.zig +++ b/src/main.zig @@ -583,7 +583,7 @@ pub fn main() !void { var battery_buf: [16:0]u8 = undefined; const battery_str = std.fmt.bufPrintZ(&battery_buf, "BAT: {d}%", .{battery_percentage}) catch break :draw_battery; - const battery_y: usize = 1; + const battery_y: usize = if (config.hide_key_hints and config.hide_version_string) 0 else 1; buffer.drawLabel(battery_str, 0, battery_y); battery_bar_shown = true; }