mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-04-24 23:55:52 +03:00
[PR #407] Add D-Bus interface for battery monitoring #393
Labels
No labels
android
bug
documentation
enhancement
good first issue
help wanted
linux
pull-request
reverse-engineering
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librepods#393
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/kavishdevar/librepods/pull/407
Author: @1jehuang
Created: 12/28/2025
Status: 🔄 Open
Base:
main← Head:feature/dbus-battery-interface📝 Commits (4)
e87019dAdd D-Bus interface for battery monitoring185fa53Add AirPods Pro 3 support939f7baAdd additional Bluetooth model ID (0x2720) for AirPods Pro 342bbf3fAdd --no-tray option to disable system tray icon📊 Changes
7 files changed (+165 additions, -11 deletions)
View changed files
📝
linux/CMakeLists.txt(+1 -0)📝
linux/ble/blemanager.cpp(+3 -1)➕
linux/dbusadaptor.hpp(+111 -0)📝
linux/enums.h(+6 -1)📝
linux/main.cpp(+37 -6)📝
linux/trayiconmanager.cpp(+5 -2)📝
linux/trayiconmanager.h(+2 -1)📄 Description
Summary
This PR implements a D-Bus interface that exposes AirPods battery information, enabling integration with status bars (like waybar) and other system monitoring tools.
Changes
dbusadaptor.hpp- D-Bus adaptor class that exposes battery propertiesinitializeDBus()inmain.cppto register the D-Bus servicedbusadaptor.hpptoCMakeLists.txtD-Bus Interface
Service:
me.kavishdevar.librepodsObject Path:
/batteryInterface:
me.kavishdevar.librepods.BatteryProperties
LeftLevel,RightLevel,CaseLevel,HeadsetLevel(int)LeftCharging,RightCharging,CaseCharging,HeadsetCharging(bool)LeftAvailable,RightAvailable,CaseAvailable,HeadsetAvailable(bool)DeviceName(string)Connected(bool)Methods
GetBatteryInfo()- Returns all battery info as a mapExample Usage
Waybar Integration
Example Python script for waybar:
Test Plan
GetBatteryInfo()returns correct battery levelsSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.