Skip to content

Latest commit

 

History

History
 
 

nm-vpn

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

nm-vpn

Parses output from nmcli to show the current connected VPN name/status

Requirements

  • NetworkManager/nmcli
  • sh
  • awk
    • tested on nawk, gawk, mawk, goawk, Plan 9 awk and busybox awk.

Usage

nm-vpn gets active connection info from nmcli, looks for interface type tun, tap, vpn. A VPN connection is treated as established only when tun|tap is present, when it's not and a vpn connection is listed as active it is treated as initializing.

Tunables

init_color - color used for marking a connection in initializing state, default is '#FFFF00'

on_color - color used for marking a connection in established state, default is '#00FF00'

Output

When tun|tap is active, nm-vpn will print in the following form:

  • Full: VPN Name
  • Short: ON
  • Color will be set to on_color value

When tun|tap in not active, nm-vpn will print in the following form:

  • Full: VPN Name
  • Short: INIT
  • Color will be set to init_color value

Config

[nm-vpn]
#init_color=#FFFF00
#on_color=#00FF00
label=VPN: 
interval=5