2019-07-18 18:45:46 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-06-15 21:21:20 +02:00
|
|
|
openvpn_icon="%{T2}%{T-}"
|
|
|
|
globalprotect_icon="%{T2}%{T-}"
|
2025-03-04 17:39:06 +01:00
|
|
|
wireguard_icon="%{T2}%{T-}"
|
2019-07-18 18:45:46 +02:00
|
|
|
|
2024-06-15 21:21:20 +02:00
|
|
|
output=""
|
|
|
|
if pgrep openvpn >/dev/null; then
|
|
|
|
output=${openvpn_icon}
|
|
|
|
fi
|
2019-07-18 18:45:46 +02:00
|
|
|
|
2024-06-15 21:21:20 +02:00
|
|
|
if pgrep gpclient >/dev/null; then
|
|
|
|
output="${output} ${globalprotect_icon}"
|
|
|
|
fi
|
2019-07-18 18:45:46 +02:00
|
|
|
|
2025-03-04 17:39:06 +01:00
|
|
|
if ip route list | grep 'dev wg0 proto kernel scope link' >/dev/null; then
|
|
|
|
output="${output} ${wireguard_icon}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "%{F#43a047}$output%{F-}"
|