mirror of
https://github.com/bvanroll/_dotfiles.git
synced 2025-12-12 12:16:11 +00:00
nm-vpn
Parses output from nmcli to show the current connected VPN name/status
Requirements
- NetworkManager/
nmcli shawk- 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_colorvalue
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_colorvalue
Config
[nm-vpn]
#init_color=#FFFF00
#on_color=#00FF00
label=VPN:
interval=5

