-
Notifications
You must be signed in to change notification settings - Fork 87
PluginNetspeed
Fábio Luciano edited this page Dec 27, 2025
·
1 revision
Display real-time network traffic with upload and download speeds.
Note: This plugin was renamed from
networktonetspeedto better reflect its purpose (speed monitoring) and avoid confusion with other network-related plugins.
↓125K ↑45K # Normal traffic - green/ok
↓2.5M ↑850K # High traffic - green/ok
↓0K ↑0K # Idle - green/ok
| Property | Value |
|---|---|
| Platform | macOS, Linux |
| Dependencies |
ifstat (preferred) or netstat/sysfs
|
| Content Type | dynamic |
| Presence | always |
# macOS
brew install ifstat
# Linux (Debian/Ubuntu)
sudo apt install ifstat
# Linux (Fedora)
sudo dnf install ifstat
# Linux (Arch)
sudo pacman -S ifstat# Enable plugin
set -g @powerkit_plugins "netspeed"# Enable plugin
set -g @powerkit_plugins "netspeed"
# Network interface (auto-detect if not set)
set -g @powerkit_plugin_netspeed_interface "auto"
# Display mode: both, upload, download
set -g @powerkit_plugin_netspeed_display "both"
set -g @powerkit_plugin_netspeed_separator " | "
# Icons
set -g @powerkit_plugin_netspeed_icon ""
set -g @powerkit_plugin_netspeed_icon_upload ""
set -g @powerkit_plugin_netspeed_icon_download ""
# Cache duration (seconds)
set -g @powerkit_plugin_netspeed_cache_ttl "2"| Option | Type | Default | Description |
|---|---|---|---|
@powerkit_plugin_netspeed_interface |
string | auto |
Network interface to monitor (auto-detects active interface) |
@powerkit_plugin_netspeed_display |
enum | both |
What to display: both, upload, download
|
@powerkit_plugin_netspeed_separator |
string | | |
Separator between upload and download speeds |
@powerkit_plugin_netspeed_icon |
icon | |
Main plugin icon |
@powerkit_plugin_netspeed_icon_upload |
icon | |
Upload speed icon (shown before upload value) |
@powerkit_plugin_netspeed_icon_download |
icon | |
Download speed icon (shown before download value) |
@powerkit_plugin_netspeed_cache_ttl |
number | 2 |
Cache duration in seconds |
@powerkit_plugin_netspeed_show_only_on_threshold |
bool | false |
Only show when traffic detected |
| State | Condition | Visibility |
|---|---|---|
active |
Network interface available | Visible |
| Level | Condition | Color |
|---|---|---|
ok |
Network active | Green |
| Context | Description |
|---|---|
idle |
No network activity (0 KB/s up and down) |
downloading |
Download speed > upload speed |
uploading |
Upload speed > download speed |
active |
Balanced traffic or equal speeds |
The plugin automatically formats speeds for readability:
| Range | Format | Example |
|---|---|---|
| < 1 MB/s | KB/s | 125K |
| ≥ 1 MB/s | MB/s | 2.5M |
Automatically detects the active network interface:
-
macOS: Uses
route -n get default -
Linux: Uses
ip routeto find default interface
Specify interface explicitly:
set -g @powerkit_plugin_netspeed_interface "en0" # macOS WiFi
set -g @powerkit_plugin_netspeed_interface "eth0" # Linux Ethernet
set -g @powerkit_plugin_netspeed_interface "wlan0" # Linux WiFiThe plugin tries multiple methods in order of preference:
| Method | Priority | Accuracy | Speed |
|---|---|---|---|
ifstat |
1 | High | Fast |
/sys/class/net |
2 | Medium | Medium |
| Fallback | 3 | Low | Slow |
set -g @powerkit_plugins "netspeed"set -g @powerkit_plugins "netspeed"
set -g @powerkit_plugin_netspeed_display "download"set -g @powerkit_plugins "netspeed"
set -g @powerkit_plugin_netspeed_display "upload"set -g @powerkit_plugins "netspeed"
set -g @powerkit_plugin_netspeed_interface "eth0"set -g @powerkit_plugins "netspeed"
set -g @powerkit_plugin_netspeed_separator " | "Output: ↓125K | ↑45K
set -g @powerkit_plugins "netspeed"
set -g @powerkit_plugin_netspeed_show_only_on_threshold "true"-
en0- Built-in WiFi/Ethernet -
en1- Thunderbolt Ethernet -
en2,en3- Additional interfaces
-
eth0,eth1- Ethernet -
wlan0,wlan1- WiFi -
enp0s3,enp2s0- Predictable names (systemd) -
wlp3s0- WiFi with predictable names
-
Check if network interface exists:
# macOS ifconfig networksetup -listallhardwareports # Linux ip link ifconfig -a
-
Verify active interface:
# macOS route -n get default # Linux ip route
-
Install ifstat for better accuracy:
# macOS brew install ifstat # Linux sudo apt install ifstat
If auto-detection fails, manually specify interface:
# Find your interface
ip link show # Linux
ifconfig # macOS
# Set it manually
set -g @powerkit_plugin_netspeed_interface "YOUR_INTERFACE"-
Check if interface is active:
# Test with ping ping -c 1 8.8.8.8 -
Try a different detection method by installing
ifstat -
Verify interface has IP address:
# macOS ifconfig en0 # Linux ip addr show eth0
If using /sys/class/net fallback:
- First read establishes baseline
- Speeds calculated on subsequent reads
- May show 0 on first render cycle
- Updates every 2 seconds by default
- ifstat is fastest and most accurate
- sysfs method requires two samples to calculate rate
- Consider increasing cache_ttl on slower systems
- Requires
ifstatfor accurate measurement - Built-in network stack provides basic stats
- WiFi interface usually
en0
- Multiple detection methods available
- sysfs provides reliable fallback
- Interface naming varies by distribution
- PluginWifi - WiFi signal strength
- PluginVpn - VPN connection status
- PluginPing - Network latency
- PluginExternalip - Public IP address