rnetapplet: a NetworkManager tray applet in Rust for wlroots compositors
Compositors like niri, Hyprland, Sway and river give you a window manager and nothing else. There is no network menu. rnetapplet is a single Rust binary that fills that gap for NetworkManager users.
What it does
A tray icon opens a popup anchored to the top right of the screen. The popup lists connected and available networks sorted by signal strength and updates live from NetworkManager's D-Bus signals. Saved networks connect on click. For secured networks, a row expands and takes the password inline, with a show toggle and an inline retry if the password is wrong.
It also has Wi-Fi and airplane mode toggles, a live search box, hotspot creation, and a QR code connect that reads from a camera or an image file. The settings gear opens nm-connection-editor, which still owns VPN and saved profile editing.
Why there are no password dialogs
NetworkManager asks a registered SecretAgent for credentials when a connection needs them. Most tray applets rely on a separate agent that pops up its own window. rnetapplet implements the SecretAgent itself, so a password request can be answered by the same row the user clicked. Wrong passwords, hotspot failures and a missing NetworkManager all show inline. The only extra windows are the camera scanner and the system connection editor.
How it is built
nm_clienttalks to NetworkManager over D-Bus using zbus.secret_agentimplements the SecretAgent interface.trayexposes a StatusNotifierItem using ksni.uiis the GTK4 popup, positioned with gtk4-layer-shell.qrandqr_scandecode QR codes from files and from the camera.
GTK has to run on the main thread, while the D-Bus and tray work lives on a background tokio runtime. The two sides are bridged with channels, so network events never block the interface.
Handling failure
If NetworkManager stops, the applet shows an offline banner and a disconnected tray icon. When the service comes back, it recovers and registers the SecretAgent again without a restart. The README is open about limits: hotspot mode needs a Wi-Fi driver whose firmware can start AP mode, WPA3-SAE-only networks go through the wpa-psk key management path, and there is no VPN, WWAN or Bluetooth interface.
Install and debug
You can install a prebuilt tarball, run cargo install --git on the repository, or build with make. For debugging it has headless flags such as --dump-aps, which does a live scan and audits the icon theme, plus --wifi on|off and --connect-saved. The code is MIT licensed at github.com/abhinash-pdl/rnetapplet. See also how the tray and layer-shell pieces fit together.