Disable battery status display by default (#852)

A couple things to fix in the new battery status display configuration.

I think this should be disabled by default. My reasoning:
- Historically a conservative approach is taken with new capabilities in Ly; even the clock is disabled by default
- The existing default creates a regression (error message) for anyone without `/sys/class/power_supply/BAT0` on their system (all non-portable PCs, and laptops that use a different identifier)
- The battery status check causes animations to momentarily hang at a regular interval

Other changes:
- Comment for `battery_id` aligned with similar config switch comments (description / useful information / effect of null setting)
- `battery_id` moved to its correct alphabetical position in the config file
- Setting aligned between `Config.zig` and `config.ini` (the prototypical config file should reflect the actual default)
- Configurations prefixed with `hide_` alphabetized

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/852
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: Matthew Rothlisberger <mattjrothlis@gmail.com>
Co-committed-by: Matthew Rothlisberger <mattjrothlis@gmail.com>
This commit is contained in:
Matthew Rothlisberger 2025-10-15 13:58:04 +02:00 committed by AnErrupTion
parent e577c454da
commit 1f2453f0fb
2 changed files with 9 additions and 8 deletions

View File

@ -41,6 +41,11 @@ asterisk = *
# The number of failed authentications before a special animation is played... ;)
auth_fails = 10
# Identifier for battery whose charge to display at top left
# Primary battery is usually BAT0 or BAT1
# If set to null, battery status won't be shown
battery_id = null
# Background color id
bg = 0x00000000
@ -183,15 +188,11 @@ 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
# Set to null to disable battery status display
# Default is BAT0, the typical identifier for the primary battery
battery_id = null
# Remove version number from the top left corner
hide_version_string = false
# Initial text to show on the info line
# If set to null, the info line defaults to the hostname

View File

@ -11,6 +11,7 @@ animation: Animation = .none,
animation_timeout_sec: u12 = 0,
asterisk: ?u32 = '*',
auth_fails: u64 = 10,
battery_id: ?[]const u8 = null,
bg: u32 = 0x00000000,
bigclock: Bigclock = .none,
bigclock_12hr: bool = false,
@ -47,9 +48,8 @@ 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,
battery_id: ?[]const u8 = "BAT0",
hide_version_string: bool = false,
initial_info_text: ?[]const u8 = null,
input_len: u8 = 34,
lang: []const u8 = "en",