Add option to hide CapsLock and NumLock states

This commit is contained in:
notiant 2025-11-14 12:13:46 +01:00 committed by GitHub
parent 68ec85f412
commit 539de5c6f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -215,6 +215,9 @@ gameoflife_initial_density = 0.4
# Remove main box borders
hide_borders = false
# Remove keyboard lock states from the top right corner
hide_keyboard_locks = false
# Remove power management command hints
hide_key_hints = false

View File

@ -52,6 +52,7 @@ gameoflife_entropy_interval: usize = 10,
gameoflife_frame_delay: usize = 6,
gameoflife_initial_density: f32 = 0.4,
hide_borders: bool = false,
hide_keyboard_locks: bool = false,
hide_key_hints: bool = false,
hide_version_string: bool = false,
initial_info_text: ?[]const u8 = null,

View File

@ -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;