[GH-ISSUE #440] upower widget doesn't parse {time_to_empty} #7174

Closed
opened 2026-05-23 02:52:51 +01:00 by JakeStanger · 0 comments
Owner

Originally created by @Disr0 on GitHub (Feb 10, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/440

Originally assigned to: @Disr0 on GitHub.

Describe the bug
The upower widget doesn't seem to format any other string besides {percentage}

To Reproduce
Steps to reproduce the behavior:

  1. Change config.json module's format to show any property other than percentage. e.g {time_to_full}
  2. Launch ironbar
  3. See that string isn't fully formatted. e.g {time_to_empty} appears as a plain string

Expected behavior
The formatting is applied and {time_to_empty} and other properties become actual values

System information:

  • Distro: [e.g. Arch Linux, Ubuntu 22.10]
  • Compositor: HyprLand
  • Ironbar version: 0.14.1-pre

Configuration

{
    "monitors": {
        "eDP-1": {
            "position": "bottom",
            "height": 30,
            "start" : [

            ],
            "center": [

            ],
            "end": [
                {
                    "type": "upower",
                    "format": "{percentage}% {icon_name} {state} {time_to_full} {time_to_empty}"
                }
            ]
        }
    }
}

Screenshots
image

Originally created by @Disr0 on GitHub (Feb 10, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/440 Originally assigned to: @Disr0 on GitHub. **Describe the bug** The upower widget doesn't seem to format any other string besides {percentage} **To Reproduce** Steps to reproduce the behavior: 1. Change config.json module's format to show any property other than percentage. e.g {time_to_full} 2. Launch ironbar 3. See that string isn't fully formatted. e.g {time_to_empty} appears as a plain string **Expected behavior** The formatting is applied and {time_to_empty} and other properties become actual values **System information:** - Distro: [e.g. Arch Linux, Ubuntu 22.10] - Compositor: HyprLand - Ironbar version: 0.14.1-pre **Configuration** ``` { "monitors": { "eDP-1": { "position": "bottom", "height": 30, "start" : [ ], "center": [ ], "end": [ { "type": "upower", "format": "{percentage}% {icon_name} {state} {time_to_full} {time_to_empty}" } ] } } } ``` **Screenshots** ![image](https://github.com/JakeStanger/ironbar/assets/89066079/bdf1670f-a806-434f-842d-1cd26812d610)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#7174
No description provided.