diff --git a/res/config.ini b/res/config.ini index 539a425..9ef25fc 100644 --- a/res/config.ini +++ b/res/config.ini @@ -186,6 +186,9 @@ hide_borders = false # Remove version number from the top left corner hide_version_string = false +# Position of version string (0: top-left, 1: top-right, 2: bottom-left, 3: bottom-right) +version_string_pos = 0 + # Remove power management command hints hide_key_hints = false diff --git a/src/config/Config.zig b/src/config/Config.zig index fb782ac..a8b9f9f 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -48,6 +48,7 @@ gameoflife_frame_delay: usize = 6, gameoflife_initial_density: f32 = 0.4, hide_borders: bool = false, hide_version_string: bool = false, +version_string_pos: u8 = 0, 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 65298ac..cd0f364 100644 --- a/src/main.zig +++ b/src/main.zig @@ -538,8 +538,19 @@ pub fn main() !void { if (!animation_timed_out) animation.draw(); if (!config.hide_version_string) { - buffer.drawLabel(ly_top_str, length, 0); - length += ly_top_str.len + 1; + switch (config.version_string_pos) { + // top-right + 1 => buffer.drawLabel(ly_top_str, buffer.width - ly_top_str.len, 0), + // bottom-left + 2 => buffer.drawLabel(ly_top_str, 0, buffer.height - 1), + // bottom-right + 3 => buffer.drawLabel(ly_top_str, buffer.width - ly_top_str.len, buffer.height - 1), + // top-left, default + else => { + buffer.drawLabel(ly_top_str, 0, 0); + length += ly_top_str.len + 1; + }, + } } if (config.bigclock != .none and buffer.box_height + (bigclock.HEIGHT + 2) * 2 < buffer.height) {