[PR #356] Feature/linux cli #377

Open
opened 2026-03-02 12:40:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kavishdevar/librepods/pull/356
Author: @meerzulee
Created: 12/6/2025
Status: 🔄 Open

Base: mainHead: feature/linux-cli


📝 Commits (3)

  • e4c4262 linux: add CLI support for querying status and controlling AirPods
  • d3b60cc linux: fix crash on tray Open/Settings and add Fusion style fallback
  • bc25f08 linux: add input validation and fix memory leak in IPC handler

📊 Changes

4 files changed (+496 additions, -45 deletions)

View changed files

📝 linux/CMakeLists.txt (+5 -0)
linux/cli.cpp (+236 -0)
linux/cli.h (+26 -0)
📝 linux/main.cpp (+229 -45)

📄 Description

Linux: Add CLI support and fix Qt theme compatibility

Features

CLI Interface

Query status and control AirPods from the command line while the app is running in the background.

# Status queries
librepods --status              # Show connection status and battery
librepods --status --json       # JSON output
librepods --waybar              # Waybar custom module format

# Control
librepods --set-noise-mode transparency
librepods --set-noise-mode nc   # noise-cancellation
librepods --set-conversational-awareness on
librepods --set-adaptive-level 50

Waybar integration example:

  "custom/airpods": {
      "exec": "librepods --waybar",
      "interval": 10,
      "return-type": "json"
  }

Bug Fixes

Qt Theme Compatibility

  • Fix crash when clicking "Open" or "Settings" in tray menu on some systems
  • Add Fusion style fallback for systems with incomplete Qt theme modules (e.g., kvantum without kvantum-qt6)

The app now works on X11, Wayland, KDE, GNOME, and other desktop environments regardless of theme configuration.

Summary by CodeRabbit

  • New Features

    • Added a command-line interface to control LibrePods without opening the GUI.
    • Status reporting in text, JSON, and Waybar-compatible formats.
    • CLI commands to set noise control mode, conversational awareness, and adaptive noise level.
    • Detects and communicates with a running instance to apply commands or show status.
  • Bug Fixes / Improvements

    • More robust startup/instance handling and clearer CLI error/status messages.

✏️ 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.

## 📋 Pull Request Information **Original PR:** https://github.com/kavishdevar/librepods/pull/356 **Author:** [@meerzulee](https://github.com/meerzulee) **Created:** 12/6/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/linux-cli` --- ### 📝 Commits (3) - [`e4c4262`](https://github.com/kavishdevar/librepods/commit/e4c4262cfe6d254fe98cc5324eee9ba6f785c96e) linux: add CLI support for querying status and controlling AirPods - [`d3b60cc`](https://github.com/kavishdevar/librepods/commit/d3b60cc5f1c32e85f600589a90308fe2f07750a0) linux: fix crash on tray Open/Settings and add Fusion style fallback - [`bc25f08`](https://github.com/kavishdevar/librepods/commit/bc25f082b84683800fbfbc391e5942a30f780064) linux: add input validation and fix memory leak in IPC handler ### 📊 Changes **4 files changed** (+496 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `linux/CMakeLists.txt` (+5 -0) ➕ `linux/cli.cpp` (+236 -0) ➕ `linux/cli.h` (+26 -0) 📝 `linux/main.cpp` (+229 -45) </details> ### 📄 Description ## Linux: Add CLI support and fix Qt theme compatibility ### Features **CLI Interface** Query status and control AirPods from the command line while the app is running in the background. ```bash # Status queries librepods --status # Show connection status and battery librepods --status --json # JSON output librepods --waybar # Waybar custom module format # Control librepods --set-noise-mode transparency librepods --set-noise-mode nc # noise-cancellation librepods --set-conversational-awareness on librepods --set-adaptive-level 50 ``` Waybar integration example: ```json "custom/airpods": { "exec": "librepods --waybar", "interval": 10, "return-type": "json" } ``` Bug Fixes Qt Theme Compatibility - Fix crash when clicking "Open" or "Settings" in tray menu on some systems - Add Fusion style fallback for systems with incomplete Qt theme modules (e.g., kvantum without kvantum-qt6) The app now works on X11, Wayland, KDE, GNOME, and other desktop environments regardless of theme configuration. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a command-line interface to control LibrePods without opening the GUI. * Status reporting in text, JSON, and Waybar-compatible formats. * CLI commands to set noise control mode, conversational awareness, and adaptive noise level. * Detects and communicates with a running instance to apply commands or show status. * **Bug Fixes / Improvements** * More robust startup/instance handling and clearer CLI error/status messages. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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
starred/librepods#377
No description provided.