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:
bar:
layout:
- monitor: "*"
right: [network]General
| Field | Type | Default | Description |
|---|---|---|---|
wifi-disabled-icon | string | "ld-wifi-animated-symbolic" | Wi-Fi icon when disabled. |
wifi-acquiring-icon | string | "ld-wifi-animated-symbolic" | Wi-Fi icon when connecting. |
wifi-offline-icon | string | "ld-wifi-animated-symbolic" | Wi-Fi icon when disconnected. |
wifi-connected-icon | string | "ld-wifi-animated-symbolic" | Wi-Fi icon when connected but signal strength unavailable. |
wifi-signal-icons | array of string | [...] | Wi-Fi signal strength icons from weak to excellent. |
wired-connected-icon | string | "ld-ethernet-animated-symbolic" | Wired icon when connected. |
wired-acquiring-icon | string | "ld-ethernet-animated-symbolic" | Wired icon when connecting. |
wired-disconnected-icon | string | "ld-ethernet-animated-symbolic" | Wired icon when disconnected. |
no-internet-icon | string | "ld-cloud-off-symbolic" | Icon while a connected link carries nothing, NetworkManager's none and limited connectivity. |
sign-in-icon | string | "ld-globe-symbolic" | Icon while a connected link asks for a sign-in, a captive portal. |
border-show | bool | false | Display border around button. |
icon-show | bool | true | Display module icon. |
tooltip | bool | true | Show the module's state in a tooltip on hover. |
label | LabelMode | "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-length | u32 | 15 | Max label characters before truncation with ellipsis. Set to 0 to disable. |
vpn-connected-icon | string | "ld-vpn-animated-symbolic" | VPN icon beside the connection icon while a VPN is connected. |
vpn-connecting-icon | string | "ld-vpn-animated-symbolic" | VPN icon beside the connection icon while a VPN connection is in flight. |
vpn-show | VpnShow | "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
| Field | Type | Default | Description |
|---|---|---|---|
border-color | ColorValue | "accent" | Border color token. |
icon-color | ColorValue | "auto" | Icon foreground color. Auto selects based on variant for contrast. |
icon-bg-color | ColorValue | "accent" | Icon container background color token. |
label-color | ColorValue | "fg-default" | Label text color token. |
button-bg-color | ColorValue | "bg-surface-elevated" | Button background color token. |
Click actions
| Field | Type | Default | Description |
|---|---|---|---|
left-click | ClickAction | "dropdown:network" | Action on left click. |
right-click | ClickAction | "" | Action on right click. |
middle-click | ClickAction | "" | Action on middle click. |
scroll-up | ClickAction | "" | Action on scroll up. |
scroll-down | ClickAction | "" | Action on scroll down. |
Default configuration
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: ""