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
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
ipIPv4 address of the ifaceText-
ipv6IPv6 address of the ifaceText-
nameserverNameserverText-

§Example

Display WiFi info if available

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

Display exact device

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

§Icons Used

  • net_loopback
  • net_vpn
  • net_wired
  • net_wireless (as a progression)
  • net_up
  • net_down

Structs§

Config

Functions§

run