How acemythos/cosmic-power-monitor works
This COSMIC desktop applet polls Linux power-supply data, combines readings into battery status and estimates, then presents configurable panel text and detailed popup information. The main workflow is supported by the excerpts; UI behavior not shown in full is represented only where the README or sampled code supports it.
Main entry points: app.rs Monitor controller · battery.rs Battery polling · main.rs Applet entry · config.rs Display settings
Components 9
Applet runtime
- Applet entry
src/main.rs - Monitor controller
src/app.rs
Battery readings
- Battery polling
src/battery.rs - Power-supply sysfs
Display and settings
- Panel display
src/app.rs - Detail popup
src/app.rs - Display settings
src/config.rs
Other components
- Desktop user
- COSMIC panel
Connections 9
- Applet entry → Monitor controller: runs applet
src/main.rs - Desktop user → Monitor controller: interacts
src/app.rs - Monitor controller → Battery polling: polls batteries
src/app.rs - Battery polling → Power-supply sysfs: reads readings
src/battery.rs - Monitor controller → Panel display: renders panel
README.md - Monitor controller → Detail popup: renders details
README.md - Monitor controller → Display settings: loads and saves
src/app.rs - Panel display → COSMIC panel: shows label
README.md - Detail popup → COSMIC panel: shows details
README.md