oh-my-posh/website/docs/segments/wifi.mdx

52 lines
1.3 KiB
Plaintext
Raw Normal View History

---
id: wifi
title: WiFi
sidebar_label: WiFi
---
## What
2021-11-23 09:31:02 -08:00
Show details about the currently connected WiFi network.
2021-11-24 09:04:07 -08:00
:::info
2021-11-23 09:31:02 -08:00
Currently only supports Windows and WSL. Pull requests for Darwin and Linux support are welcome :)
:::
## Sample Configuration
```json
{
"type": "wifi",
"style": "powerline",
"background": "#8822ee",
2021-11-23 09:31:02 -08:00
"foreground": "#222222",
"background_templates": [
"{{ if (lt .Signal 60) }}#DDDD11{{ else if (lt .Signal 90) }}#DD6611{{ else }}#11CC11{{ end }}"
],
"powerline_symbol": "\uE0B0",
2022-03-27 01:12:47 -07:00
"template": "\uFAA8 {{ .SSID }} {{ .Signal }}% {{ .ReceiveRate }}Mbps"
}
```
2022-02-01 03:10:46 -08:00
## Template ([info][templates])
:::note default template
``` template
{{ if .Error }}{{ .Error }}{{ else }}\uFAA8 {{ .SSID }} {{ .Signal }}% {{ .ReceiveRate }}Mbps{{ end }}
```
:::
### Properties
- `.SSID`: `string` - the SSID of the current wifi network
2021-11-23 09:31:02 -08:00
- `.RadioType`: `string` - the radio type - _e.g. 802.11ac, 802.11ax, 802.11n, etc._
- `.Authentication`: `string` - the authentication type - _e.g. WPA2-Personal, WPA2-Enterprise, etc._
- `.Channel`: `int` - the current channel number
- `.ReceiveRate`: `int` - the receive rate (Mbps)
- `.TransmitRate`: `int` - the transmit rate (Mbps)
- `.Signal`: `int` - the signal strength (%)
2022-04-20 09:43:59 -07:00
[templates]: /docs/configuration/templates