[GH-ISSUE #1238] Battery: notify when entering a threshold #5997

Closed
opened 2026-05-23 01:54:24 +01:00 by JakeStanger · 1 comment
Owner

Originally created by @ksharizard on GitHub (Nov 12, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1238

Is your feature request related to a problem? Please describe.

I utilise an external script which polls every minute or so to check the battery percentage. I have hardcoded some values to notify me when it is low on battery or when it is sufficiently full. However, I have also defined these thresholds in ironbar, which also checks my battery.

Describe the solution you'd like

I would like a way to notify (or run an external command) when a threshold is crossed. An interval could be defined so it keeps on notifying you until you plug/unplug your laptop. When crossing these thresholds, you can also check whether the laptop is charging or not and have different notifications be sent.

Describe alternatives you've considered

I could use an external script but this seems redundant if ironbar already polls my battery. Waybar also has this feature, however, it only notifies once when it crosses the threshold. Sometimes when I boot my laptop up and my battery is below a threshold, I will not get notified.

Originally created by @ksharizard on GitHub (Nov 12, 2025). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1238 **Is your feature request related to a problem? Please describe.** I utilise an external script which polls every minute or so to check the battery percentage. I have hardcoded some values to notify me when it is low on battery or when it is sufficiently full. However, I have also defined these thresholds in ironbar, which also checks my battery. **Describe the solution you'd like** I would like a way to notify (or run an external command) when a threshold is crossed. An interval could be defined so it keeps on notifying you until you plug/unplug your laptop. When crossing these thresholds, you can also check whether the laptop is charging or not and have different notifications be sent. **Describe alternatives you've considered** I could use an external script but this seems redundant if ironbar already polls my battery. Waybar also has this feature, however, it only notifies once when it crosses the threshold. Sometimes when I boot my laptop up and my battery is below a threshold, I will not get notified.
Author
Owner

@JakeStanger commented on GitHub (Nov 13, 2025):

My view on this is that it is out of scope. Ironbar's job is to consume information from various system components and display this, but not provide that information. What's being asked for here sounds like the job of its own daemon.

This seems redundant if ironbar already polls my battery.

Polling the battery is the cheap/easy bit, as Ironbar is able to listen to this over the UPower Dbus interface. The threshhold/notification parts do not exist in Ironbar currently.


Likely in the future, Ironbar will expose battery values over IPC. A script could potentially be written to watch this, which might offer a slighly nicer interface than currently available to read the battery.

<!-- gh-comment-id:3527410580 --> @JakeStanger commented on GitHub (Nov 13, 2025): My view on this is that it is out of scope. Ironbar's job is to consume information from various system components and display this, but not *provide* that information. What's being asked for here sounds like the job of its own daemon. > This seems redundant if ironbar already polls my battery. Polling the battery is the cheap/easy bit, as Ironbar is able to listen to this over the UPower Dbus interface. The threshhold/notification parts do not exist in Ironbar currently. --- Likely in the future, Ironbar will expose battery values over IPC. A script could potentially be written to watch this, which might offer a slighly nicer interface than currently available to read the battery.
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#5997
No description provided.