$ show pop-os/cosmic-applets
This repository is the COSMIC desktop environment's suite of panel applets, implemented as a Rust Cargo workspace with approximately 30 crate members. Each applet (audio, battery, bluetooth, network, notifications, power, tiling, time, accessibility, input sources, minimize, workspaces, app list, status area) is an independent cosmic::Application component that can be compiled as a separate binary or dispatched from a unified 'cosmic-applets' binary via symlink naming. The architecture follows the Elm/iced pattern with Message enums, update/view functions, and subscriptions to system events (Wayland protocols, D-Bus signals, config changes, timer ticks). All applets share a common localization infrastructure using i18n-embed and Fluent, and many reuse a 'wayland_subscription' pattern for compositor events. The codebase is actively developed by System76 for the Pop!_OS COSMIC desktop, with significant internationalization (60+ language directories) and integration with Linux system services (NetworkManager, PulseAudio, UPower, BlueZ, systemd-logind). It is not a data/research repository.
The LLM identified 2 files worth highlighting for reuse:
Provides a generic `PowerBackend` trait with async methods for profile list, active profile, and brightness control. Implements two concrete backends: `PowerDaemon` (System76 custom daemon) and `PowerProfiles` (UPower-based). The module auto-selects the available backend with graceful fallback. This pattern is reusable for any Rust application that needs to abstract over multiple system service APIs.
Implements the server side of the FreeDesktop StatusNotifierWatcher protocol (org.kde.StatusNotifierWatcher) using zbus. Manages registered tray items (StatusNotifierItem) through D-Bus method calls (RegisterStatusNotifierItem, RegisterStatusNotifierHost) and property changes. The code correctly handles unique names, host registration, and protocol versioning. This component can be extracted and reused as a standalone D-Bus service for system tray icon management in any Linux desktop environment.