Conversation
## Motivation The application previously only supported macOS for system tray functionality. Linux users need equivalent tray integration to access menu options and receive status updates from the system tray area. ## Architecture / Approach Implements Linux tray support using the ksni crate which communicates via the StatusNotifierItem DBus protocol. Adds a new LinuxTray struct that implements the ksni::Tray trait, handling icon rendering, click events, and context menu actions. The implementation is fully conditionally compiled behind target_os = "linux" to maintain platform separation. Icon rendering converts RGBA pixel data to ARGB format expected by the Linux notification system. ## Affected Components - exactobar-app/src/tray.rs: Added LinuxTray struct, LinuxTrayEvent enum, and platform-specific SystemTray methods - exactobar-app/Cargo.toml: Added ksni dependency with blocking and async-io features for Linux target - exactobar-app/src/menu.rs: Added conditional background for Linux (opaque instead of blur) - exactobar-app/src/theme.rs: Added window_background() function for platforms without blur support ## Compatibility / Testing Adds platform-specific code that only compiles on Linux. The stub implementation for non-macOS/Linux platforms is preserved. Requires testing on Linux distributions with StatusNotifierItem support (GNOME, KDE, etc.).
## Motivation Improved code documentation is essential for maintainability, API consumer understanding, and automated documentation generation. Many enums, structs, constants, and functions lacked descriptive doc comments. ## Architecture / Approach Systematically added doc comments to enum variants, struct fields, public constants, and public functions throughout the codebase. The documentation follows Rust conventions, using /// for item documentation and /// for field-level documentation within enum and struct definitions. Error types received enhanced field documentation to improve error handling clarity. ## Affected Components - exactobar-core/src/models/provider.rs: IconStyle enum variants - exactobar-fetch/src/error.rs: All error enum field documentation (KeychainError, ProcessError, PtyError, BrowserError) - exactobar-fetch/src/host/keychain.rs: Service names and account names constants - exactobar-fetch/src/host/browser.rs: Browser enum variants - exactobar-fetch/src/host/process.rs: CLI command constants - exactobar-fetch/src/host/status.rs: Status page URL constants - All provider descriptor and strategy modules: Added documentation to public structs and functions ## Compatibility / Testing No functional code changes. Only documentation additions that improve IDE tooltips and rustdoc output.
## Motivation The macOS-only architecture caused compilation issues on other platforms due to unused code warnings. Additionally, some code style improvements were needed for future multi-platform support. ## Architecture / Approach Added cfg_attr allow(dead_code) directives to modules that are only used on macOS to suppress warnings on other platforms. This maintains a single codebase targeting multiple platforms. Fixed spawn closure parameter naming from mut cx to cx for consistency with asynchronous callback patterns where mutable access is not needed. ## Affected Components - exactobar-app/src/actions.rs: Fixed spawn closure parameter, added dead_code allowance - exactobar-app/src/components/mod.rs: Added dead_code allowances for unused UI components on non-macOS - exactobar-app/src/icon.rs: Added dead_code allowance for macOS-specific icon rendering - exactobar-app/src/state.rs: Fixed spawn closure parameter, added dead_code allowance - exactobar-app/src/menu.rs: Fixed spawn closure parameter, added Linux background styling - exactobar-app/src/theme.rs: Added window_background() for non-blur platforms - exactobar-store/src/settings_store.rs: Added LogLevel variant documentation - exactobar-store/src/usage_store.rs: Added CostUsageSnapshot and DailyCost field documentation ## Compatibility / Testing No functional changes on macOS. Enables successful compilation on Linux by properly handling platform-specific code. All existing functionality is preserved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add baseline Linux support so exactobar can run outside macOS, with a native tray integration and CI coverage to keep it stable across platforms.
Architecture / Approach
Affected Components
Compatibility / Testing