From cc07c4870a1c4d6b293544bef2dbfa082906c253 Mon Sep 17 00:00:00 2001 From: notiant Date: Sat, 15 Nov 2025 16:32:42 +0100 Subject: [PATCH] Add option to hide CapsLock and NumLock states (#864) Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/864 Reviewed-by: AnErrupTion Co-authored-by: notiant Co-committed-by: notiant --- res/config.ini | 3 +++ src/config/Config.zig | 1 + src/main.zig | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/res/config.ini b/res/config.ini index 96006a4..f090397 100644 --- a/res/config.ini +++ b/res/config.ini @@ -218,6 +218,9 @@ hide_borders = false # Remove power management command hints hide_key_hints = false +# Remove keyboard lock states from the top right corner +hide_keyboard_locks = false + # Remove version number from the top left corner hide_version_string = false diff --git a/src/config/Config.zig b/src/config/Config.zig index 371f256..fc1a07f 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -53,6 +53,7 @@ gameoflife_frame_delay: usize = 6, gameoflife_initial_density: f32 = 0.4, hide_borders: bool = false, hide_key_hints: bool = false, +hide_keyboard_locks: bool = false, hide_version_string: bool = false, initial_info_text: ?[]const u8 = null, input_len: u8 = 34, diff --git a/src/main.zig b/src/main.zig index 8f6d434..a4108e4 100644 --- a/src/main.zig +++ b/src/main.zig @@ -755,7 +755,7 @@ pub fn main() !void { buffer.drawLabel(label_txt, buffer.box_x, buffer.box_y + buffer.box_height); } - if (can_get_lock_state) draw_lock_state: { + if (!hide_keyboard_locks and can_get_lock_state) draw_lock_state: { const lock_state = interop.getLockState() catch |err| { try info_line.addMessage(lang.err_lock_state, config.error_bg, config.error_fg); can_get_lock_state = false;