10 lines
347 B
Bash
Executable file
10 lines
347 B
Bash
Executable file
#!/usr/bin/env dash
|
|
|
|
STATUS=`ivpn status | awk '{print "\\\n"$0}'`
|
|
TOOLTIP=`env echo -E ${STATUS} | cut -c 3-`
|
|
CLASS=`env echo ${STATUS} | grep 'VPN' | awk '{print $3}' | tr [:upper:] [:lower:]`
|
|
|
|
[ "$CLASS" = "connected" ] && TEXT="\uf084" || TEXT="\uf071"
|
|
|
|
env echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${TOOLTIP}\", \"class\": \"${CLASS}\"}"
|