Previously, format-icons with N icons would divide the 0-100 range
into N equal parts. This made it impossible to define custom ranges
like 0%, 1-69%, 70-100%.
This adds support for an alternative object syntax in format-icons:
"format-icons": [
{ "icon": "▁", "max": 0},
{ "icon": "▅", "max": 69 },
{ "icon": "▇", "max": 100 }
]
The array is iterated in order and the first icon whose max value
is >= the current percentage is returned. If no threshold matches,
the last icon is used as fallback. The existing string array syntax
remains fully supported and unchanged.
Applies to both getIcon overloads, affecting all modules that use
format-icons (battery, pulseaudio, network, backlight, etc.).
Closes#5150