Skip to content

network ​

Network connection status with a dropdown for switching connections.

Each icon is also put in the state it stands for: a Wi-Fi icon in disabled, offline, acquiring or the signal's zero, low, high or full, a wired icon in connected, acquiring or disconnected, and a VPN icon in connected or connecting. The defaults are one animated icon for each that declares its states, so a change animates; an icon without states ignores them.

A link NetworkManager reports as carrying nothing shows no-internet-icon, and one that asks for a sign-in, a captive portal, shows sign-in-icon.

Add it to your layout with network:

yaml
bar:
  layout:
    - monitor: "*"
      right: [network]

General ​

FieldTypeDefaultDescription
wifi-disabled-iconstring"ld-wifi-animated-symbolic"Wi-Fi icon when disabled.
wifi-acquiring-iconstring"ld-wifi-animated-symbolic"Wi-Fi icon when connecting.
wifi-offline-iconstring"ld-wifi-animated-symbolic"Wi-Fi icon when disconnected.
wifi-connected-iconstring"ld-wifi-animated-symbolic"Wi-Fi icon when connected but signal strength unavailable.
wifi-signal-iconsarray of string[...]Wi-Fi signal strength icons from weak to excellent.
wired-connected-iconstring"ld-ethernet-animated-symbolic"Wired icon when connected.
wired-acquiring-iconstring"ld-ethernet-animated-symbolic"Wired icon when connecting.
wired-disconnected-iconstring"ld-ethernet-animated-symbolic"Wired icon when disconnected.
no-internet-iconstring"ld-cloud-off-symbolic"Icon while a connected link carries nothing, NetworkManager's none and limited connectivity.
sign-in-iconstring"ld-globe-symbolic"Icon while a connected link asks for a sign-in, a captive portal.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
tooltipbooltrueShow the module's state in a tooltip on hover.
labelLabelMode"hover"When the label beside the icon shows the network name (SSID for Wi-Fi, "Wired" for ethernet); hover grows it out while the pointer is on the module.
label-max-lengthu3215Max label characters before truncation with ellipsis. Set to 0 to disable.
vpn-connected-iconstring"ld-vpn-animated-symbolic"VPN icon beside the connection icon while a VPN is connected.
vpn-connecting-iconstring"ld-vpn-animated-symbolic"VPN icon beside the connection icon while a VPN connection is in flight.
vpn-showVpnShow"auto"Whether a VPN icon shows beside the Wi-Fi/wired icon.
More about wifi-signal-icons

The signal percentage maps to the icons in equal steps: with three, 0-32% uses icons[0], 33-65% uses icons[1] and the rest icons[2].

More about vpn-show

The connection icon always shows. auto adds the VPN icon while a VPN connects or is connected and draws nothing while every VPN is off, so a machine with no VPN looks as it would without the key.

Colors ​

FieldTypeDefaultDescription
border-colorColorValue"accent"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"accent"Icon container background color token.
label-colorColorValue"fg-default"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions ​

FieldTypeDefaultDescription
left-clickClickAction"dropdown:network"Action on left click.
right-clickClickAction""Action on right click.
middle-clickClickAction""Action on middle click.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.

Default configuration ​

yaml
modules:
  network:
    wifi-disabled-icon: ld-wifi-animated-symbolic
    wifi-acquiring-icon: ld-wifi-animated-symbolic
    wifi-offline-icon: ld-wifi-animated-symbolic
    wifi-connected-icon: ld-wifi-animated-symbolic
    wifi-signal-icons:
      - ld-wifi-animated-symbolic
    wired-connected-icon: ld-ethernet-animated-symbolic
    wired-acquiring-icon: ld-ethernet-animated-symbolic
    wired-disconnected-icon: ld-ethernet-animated-symbolic
    no-internet-icon: ld-cloud-off-symbolic
    sign-in-icon: ld-globe-symbolic
    border-show: false
    border-color: accent
    icon-show: true
    tooltip: true
    icon-color: auto
    icon-bg-color: accent
    label: hover
    label-color: fg-default
    label-max-length: 15
    button-bg-color: bg-surface-elevated
    vpn-connected-icon: ld-vpn-animated-symbolic
    vpn-connecting-icon: ld-vpn-animated-symbolic
    vpn-show: auto
    left-click: dropdown:network
    right-click: ""
    middle-click: ""
    scroll-up: ""
    scroll-down: ""

Released under the MIT License.