i3status_rs::blocks

Module vpn

source
Expand description

Shows the current connection status for VPN networks

This widget toggles the connection on left click.

§Configuration

KeyValuesDefault
driverWhich vpn should be used . Available drivers are: "nordvpn" and "mullvad""nordvpn"
intervalUpdate interval in seconds.10
format_connectedA string to customise the output in case the network is connected. See below for available placeholders." VPN: $icon "
format_disconnectedA string to customise the output in case the network is disconnected. See below for available placeholders." VPN: $icon "
state_connectedThe widgets state if the vpn network is connected.info
state_disconnectedThe widgets state if the vpn network is disconnectedidle
PlaceholderValueTypeUnit
iconA static iconIcon-
countryCountry currently connected toText-
flagCountry specific flag (depends on a font supporting them)Text-
ActionDefault buttonDescription
toggleLefttoggles 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

Structs§

Enums§

Functions§