Skip to main content

Module net

Module net 

Source
Expand description

Network information

This block uses sysfs and netlink and thus does not require any external dependencies.

§Configuration

KeyValuesDefault
deviceNetwork interface to monitor (as specified in /sys/class/net/). Supports regex.If not set, device will be automatically selected every interval
intervalUpdate interval in seconds2
wifi_generation_superscriptDisplay $wifi_generation using Unicode superscripts (⁴, ⁵, ⁶, ⁶ᴱ, ⁷)true
formatA MultiFormat string to customise the output of this block. See below for available placeholders.[" $icon ^icon_net_down $speed_down.eng(prefix:K) ^icon_net_up $speed_up.eng(prefix:K) "]
inactive_formatSame as format but for when the interface is inactive" $icon Down "
missing_formatSame as format but for when the device is missing" × "
ActionDescriptionDefault button
toggle_format DEPRECATEDToggles between format and format_alt-
next_formatSwitches to the next format in the listLeft
prev_formatSwitches to the previous format in the listRight
PlaceholderValueTypeUnit
iconIcon based on device’s typeIcon-
speed_downDownload speedNumberBytes per second
speed_upUpload speedNumberBytes per second
graph_downDownload speed graphText-
graph_upUpload speed graphText-
deviceThe name of deviceText-
ssidNetwork SSID (WiFi only)Text-
frequencyWiFi frequencyNumberHz
signal_strengthWiFi signalNumber%
bitrateWiFi connection bitrateNumberBits per second
wifi_generationWiFi generation: 4 (HT), 5 (VHT), 6 (HE on 2.4/5 GHz), 6E (HE on 6 GHz), 7 (EHT on any band)Text-
ipIPv4 address of the ifaceText-
ipv6IPv6 address of the ifaceText-
nameserverNameserverText-
enabledPresent if the device is switched on (not turned off with rfkill or ip link set down)Flag-

HT is 802.11n, VHT is 802.11ac, HE is 802.11ax and EHT is 802.11be. wifi_generation uses the associated station’s current TX PHY metadata from nl80211. It does not report a negotiated mode or advertised capabilities. The dependency does not expose RX PHY metadata. Rate fallback can lower the reported generation. Numeric bitrate and channel width are never used to infer a generation; frequency only distinguishes HE on 6 GHz from HE on 2.4/5 GHz. The value is absent without a matching association or sufficient TX metadata, and is refreshed every interval without retaining previous values.

§Example

Display WiFi info if available

[[block]]
block = "net"
format = " $icon {$signal_strength $ssid $frequency|Wired connection} via $device "

Display the WiFi generation in plain text, preserving the signal-strength icon

[[block]]
block = "net"
wifi_generation_superscript = false
format = " $icon{ $wifi_generation|} ↓$speed_down ↑$speed_up "

Display the generation with Unicode superscripts (the default):

[[block]]
block = "net"
format = " $icon{$wifi_generation|} ↓$speed_down ↑$speed_up "

Display exact device

[[block]]
block = "net"
device = "^wlo0$"

Tell a WiFi device that is not connected from one that is switched off (with rfkill for example)

[[block]]
block = "net"
device = "^wlan0$"
format = " $icon $signal_strength "
inactive_format = " {$enabled{not connected}|switched off} "

§Icons Used

  • net_loopback ($icon)
  • net_vpn ($icon)
  • net_wired ($icon)
  • net_wireless ($icon, as a progression)
  • net_up (^icon_net_up)
  • net_down (^icon_net_down)

Structs§

Config