1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2025-03-15 12:25:24 +00:00

21 lines
428 B
Plaintext
Raw Normal View History

2019-07-18 18:45:46 +02:00
#!/usr/bin/env bash
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
output=""
if pgrep openvpn >/dev/null; then
output=${openvpn_icon}
fi
2019-07-18 18:45:46 +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-}"