mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 10:15:20 +01:00
[PR #1357] [MERGED] Refactor battery client code, add mock battery client #4139
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#4139
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?
📋 Pull Request Information
Original PR: https://github.com/JakeStanger/ironbar/pull/1357
Author: @JakeStanger
Created: 1/31/2026
Status: ✅ Merged
Merged: 2/1/2026
Merged by: @JakeStanger
Base:
master← Head:refactor/battery2📝 Commits (4)
b769b81refactor(battery): fully move client code toclients/upowerd0ddd51test(battery): add mock cliented98bf7ci: fix incorrectwarningsflag6f5f228ci(build): allow unused macros in feature checks📊 Changes
8 files changed (+323 additions, -161 deletions)
View changed files
📝
.github/workflows/build.yml(+2 -2)📝
Cargo.toml(+3 -0)📝
docs/Compiling.md(+2 -0)➕
src/clients/upower/client.rs(+144 -0)📝
src/clients/upower/mod.rs(+51 -76)➕
src/clients/upower/test_client.rs(+110 -0)📝
src/modules/battery.rs(+8 -83)➕
test-configs/battery.corn(+3 -0)📄 Description
Abstracts the dbus proxy code behind client code to match other clients/modules.
Adds a client which can be used in place of the upower dbus client for testing the battery widget, including on devices with no battery.
This sends mock sends which fully cycles the battery every 20 seconds.
Can be enabled using
--features battery.test🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.