Parses output from nmcli
to show the current connected VPN name/status
- NetworkManager/
nmcli
sh
awk
- tested on nawk, gawk, mawk, goawk, Plan 9 awk and busybox awk.
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.
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'
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
[nm-vpn]
#init_color=#FFFF00
#on_color=#00FF00
label=VPN:
interval=5