diff --git a/res/config.ini b/res/config.ini index df6d721..a74cd5c 100644 --- a/res/config.ini +++ b/res/config.ini @@ -150,6 +150,9 @@ gameoflife_initial_density = 0.4 # Remove main box borders hide_borders = false +# Remove version number from the top left corner +hide_version_string = false + # Remove power management command hints hide_key_hints = false diff --git a/src/config/Config.zig b/src/config/Config.zig index e4030ce..558668b 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -41,6 +41,7 @@ gameoflife_entropy_interval: usize = 10, gameoflife_frame_delay: usize = 6, gameoflife_initial_density: f32 = 0.4, hide_borders: bool = false, +hide_version_string: bool = false, hide_key_hints: bool = false, initial_info_text: ?[]const u8 = null, input_len: u8 = 34, diff --git a/src/main.zig b/src/main.zig index b0d394a..6eed2a2 100644 --- a/src/main.zig +++ b/src/main.zig @@ -427,9 +427,14 @@ pub fn main() !void { if (auth_fails < config.auth_fails) { _ = termbox.tb_clear(); + var length: usize = 0; + if (!animation_timed_out) animation.draw(); - buffer.drawLabel(ly_top_str, 0, 0); + if (!config.hide_version_string) { + buffer.drawLabel(ly_top_str, length, 0); + length += ly_top_str.len + 1; + } if (config.bigclock != .none and buffer.box_height + (bigclock.HEIGHT + 2) * 2 < buffer.height) draw_big_clock: { const format = "%H:%M"; @@ -490,8 +495,6 @@ pub fn main() !void { info_line.label.draw(); if (!config.hide_key_hints) { - var length: usize = ly_top_str.len + 1; - buffer.drawLabel(config.shutdown_key, length, 0); length += config.shutdown_key.len + 1; buffer.drawLabel(" ", length - 1, 0);