By CLOUDWERX LAB | Digital Food for the Analog Soul
A lightweight Rust application that monitors AC power status and displays desktop notifications on Linux.
Contact: mail@cloudwerx.dev
Website: http://cloudwerx.dev
- System tray icon that reflects power status
- Desktop notifications with sound when power is plugged/unplugged
- Right-click menu with status display and controls
- Minimal resource usage
- Silent background monitoring
- Linux with
/sys/class/power_supplysupport - D-Bus notification daemon
- System tray (tested on Cinnamon, should work on GNOME, KDE, XFCE)
You'll need to install Rust if you don't have it already:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shThen activate the Rust environment:
source $HOME/.cargo/envVerify installation:
rustc --version
cargo --versioncargo build --release
mkdir -p ~/.local/bin
cp target/release/power-notification ~/.local/bin/Create ~/.config/autostart/power-notification.desktop:
[Desktop Entry]
Type=Application
Name=Power Notification
Exec=/home/YOUR_USERNAME/.local/bin/power-notification
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=trueReplace YOUR_USERNAME with your actual username.
Run the application:
power-notificationOr run in background:
power-notification &Right-click the tray icon to:
- View current power status
- Test notifications
- Exit the application
cargo build --release- Monitors
/sys/class/power_supplyfor AC adapter status changes - Polls every 2 seconds for power state changes
- Uses D-Bus for desktop notifications
- Graceful error handling if power supply interface is unavailable
- Works without icon themes (uses generic system icons)
Apache License 2.0
Copyright © 2026 CLOUDWERX LAB
For license details, see the LICENSE file.