A high-performance, low-footprint network speed monitor for Waybar and standalone use. Written in Rust for maximum efficiency with zero-runtime overhead. Supports real-time throughput calculation, Pango markup styling, and SVG icons.
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Makefile | ||
| network.svg | ||
| README.md | ||
| waybar_example.jsonc | ||
| waybar_style.css | ||
Net Speed Applet
A lightweight network speed monitor for Waybar and standalone use.
Features
- Waybar Integration: Continuous JSON output for custom modules.
- Standalone Mode: Human-readable text output for the terminal.
- Interface Filtering: Track all active interfaces or specific ones.
- Low Footprint: Written in Rust, small static binary (~400KB).
Installation
Using Makefile (Recommended)
This will build, strip, and install the binary to /usr/local/bin.
make
sudo make install
Manual Build
- Build the project:
cargo build --release - (Optional) Strip the binary to reduce size:
strip target/release/net-speed-applet
Usage
Waybar Configuration
Automatic configuration of Waybar is not provided as it could overwrite your existing setup. Instead, refer to waybar_example.jsonc for a template.
Add this to your Waybar config.jsonc:
"custom/network_speed": {
"format": "{}",
// Do NOT set "interval" for continuous output modules.
// Waybar will read output line-by-line as it's produced.
"exec": "net-speed-applet",
"return-type": "json",
"tooltip": true
}
Note: To apply changes and reload Waybar without restarting it, run:
killall -SIGUSR2 waybar
SVG Icons
If you want to use an SVG icon:
- Place
network.svgin your Waybar config folder (e.g.,~/.config/waybar/network.svg). - Use the CSS provided in
waybar_style.css. - Note: Since GTK 3 (Waybar's engine) does not support CSS masks or pseudo-elements, the icon is set as a
background-image. - Coloring: To change the icon color, you must edit the
strokeattribute directly inside thenetwork.svgfile.
Troubleshooting
If the module is not appearing:
- Binary Path: Ensure
net-speed-appletis in your$PATH(e.g.,/usr/local/bin) or use the absolute path in theexecfield. - Module List: Make sure
"custom/network_speed"is included in yourmodules-left,modules-center, ormodules-rightarray inconfig.jsonc. - Logs: Run
waybarfrom a terminal to see if there are any error messages regarding the custom module.
Standalone Mode
Run in the terminal for real-time stats:
./net-speed-applet --text
Help
./net-speed-applet --help