feat(tray): Add Linux/Wayland support#273
feat(tray): Add Linux/Wayland support#273benwyrosdick wants to merge 11 commits intorobinebers:mainfrom
Conversation
…s, and reset times for usage metrics, and add the `time` crate.
There was a problem hiding this comment.
1 issue found across 14 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/openusage-waybar/src/main.rs">
<violation number="1" location="crates/openusage-waybar/src/main.rs:176">
P2: Plugin-controlled strings are inserted into Pango tooltip markup without escaping, enabling broken rendering or markup injection in Waybar tooltips.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Pull request overview
Adds Linux/Wayland (Waybar) support by introducing a standalone Waybar CLI that runs the existing plugin system, and by extracting the plugin engine into a reusable Rust crate that both the Tauri app and CLI can consume.
Changes:
- Extract plugin engine into
crates/openusage-plugin-engineand wiresrc-taurito use it as a dependency. - Add
openusage-waybarbinary crate that runs plugins and outputs Waybar-compatible JSON (with Pango tooltips). - Add a root Cargo workspace and document Waybar installation/configuration in the README.
Reviewed changes
Copilot reviewed 9 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src-tauri/src/lib.rs | Switches from an internal module to the shared openusage-plugin-engine crate. |
| src-tauri/Cargo.toml | Adds a path dependency on the extracted plugin engine crate. |
| crates/openusage-waybar/src/main.rs | New Waybar CLI: plugin discovery, execution, and Waybar JSON formatting. |
| crates/openusage-waybar/Cargo.toml | Declares the new openusage-waybar binary crate and dependencies. |
| crates/openusage-plugin-engine/src/runtime.rs | Updates imports to match the new crate module layout. |
| crates/openusage-plugin-engine/src/manifest.rs | New manifest/plugin loader and link sanitization; loads entry script + icon. |
| crates/openusage-plugin-engine/src/lib.rs | Exposes plugin engine modules and adds load_plugins_from_dir for CLIs. |
| crates/openusage-plugin-engine/src/host_api.rs | New host API implementation (env/fs/http/sqlite/ls/ccusage/etc). |
| crates/openusage-plugin-engine/Cargo.toml | Declares the new plugin engine crate and its dependencies. |
| README.md | Adds Waybar installation/config instructions and adjusts download section. |
| Cargo.toml | Introduces a root workspace with src-tauri + new crates. |
| .gitignore | Ignores Cargo /target/ build artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… to use new platform-specific helper functions for macOS and Linux.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… `extract_primary_progress`.
|
Re: markup escaping feedback — fixed in 7412aa1. Added |
|
Love it but without looking into this or major support, a 7.7k diff PR is incredibly hard to review and keep updated. I think we'll make the decision to only support macOS to keep things simple, and hope that people will maintain a Linux/Windows port on their own. Thanks though! |
Description
Adds support for Linux/Wayland on Waybar
Related Issue
Related to #77 but focused on Linux and not Windows
Type of Change
Testing
bun run buildand it succeededbun run testand all tests passI tested the change locally with(tauri not available on linux)bun tauri devScreenshots
Checklist
mainbranchSummary by cubic
Add native Waybar support on Linux/Wayland via a new CLI, extract the plugin engine into its own crate, and add Linux keychain support so plugins can store and read secrets.
New Features
openusage-waybarbinary that outputs Waybar JSON; module text shows remaining %, andpercentagereports remaining.primaryOrder; falls back to the first progress line.OPENUSAGE_PLUGINS_DIR; supports--list,--json, and selecting plugins by ID.Refactors
openusage-plugin-enginecrate and reused by the Tauri app.secret-tool(libsecret).Cargo.lockadded and.gitignoreupdated for/target.Written for commit e1ac2e5. Summary will update on new commits.