Expand description
Shows the current connection status for VPN networks
This widget toggles the connection on left click.
§Configuration
Key | Values | Default |
---|---|---|
driver | Which vpn should be used . Available drivers are: "nordvpn" and "mullvad" | "nordvpn" |
interval | Update interval in seconds. | 10 |
format_connected | A string to customise the output in case the network is connected. See below for available placeholders. | " VPN: $icon " |
format_disconnected | A string to customise the output in case the network is disconnected. See below for available placeholders. | " VPN: $icon " |
state_connected | The widgets state if the vpn network is connected. | info |
state_disconnected | The widgets state if the vpn network is disconnected | idle |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
country | Country currently connected to | Text | - |
flag | Country specific flag (depends on a font supporting them) | Text | - |
Action | Default button | Description |
---|---|---|
toggle | Left | toggles the vpn network connection |
§Drivers
§nordvpn
Behind the scenes the nordvpn driver uses the nordvpn
command line binary. In order for this to work
properly the binary should be executable without root privileges.
§Mullvad
Behind the scenes the mullvad driver uses the mullvad
command line binary. In order for this to work properly the binary should be executable and mullvad daemon should be running.
§Example
Shows the current vpn network state:
[[block]]
block = "vpn"
driver = "nordvpn"
interval = 10
format_connected = "VPN: $icon "
format_disconnected = "VPN: $icon "
state_connected = "good"
state_disconnected = "warning"
Possible values for state_connected
and state_disconnected
:
warning
critical
good
info
idle
§Icons Used
net_vpn
net_wired
net_down
- country code flags (if supported by font)
Flags: They are not icons but unicode glyphs. You will need a font that includes them. Tested with: https://www.babelstone.co.uk/Fonts/Flags.html