mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 08:15:21 +01:00
[GH-ISSUE #364] Allow customizing the format of numbers in certain modules #8564
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#8564
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pluiedev on GitHub (Nov 27, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/364
Is your feature request related to a problem? Please describe.
Currently some modules, like sys_info, formats numbers like percentages and memory usage in GB in a fixed way, and that is sometimes not ideal. Often times I'd like these numbers to have one decimal point, and it kinda frustrates me that there's currently no way to do that.
Describe the solution you'd like
Perhaps we could do it like Waybar and use a format specifier? Using a Rust style syntax, we can have something like
{memory_used:.2}. That might conflict with the syntax currently reserved for specifying sensors and such for temperature readouts, but we might be able to find a compromise.Describe alternatives you've considered
Aside from different format string syntaxes, I'm not sure if there's any more alternatives other than keeping the status quo.
@JakeStanger commented on GitHub (Nov 27, 2023):
Hey, totally on board with this & I think rust-style formatting strings are the way to go. This is similar to #149 so I'll probably look to tackle both in one go.