1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2025-03-14 17:45:24 +00:00

[polybar] Add wireguard to check_vpn

This commit is contained in:
Daniel Carrillo 2025-03-04 17:39:06 +01:00
parent 40310a71e5
commit cb37621f00
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16

View File

@ -2,6 +2,7 @@
openvpn_icon="%{T2}%{T-}"
globalprotect_icon="%{T2}%{T-}"
wireguard_icon="%{T2}󰒃%{T-}"
output=""
if pgrep openvpn >/dev/null; then
@ -12,4 +13,8 @@ if pgrep gpclient >/dev/null; then
output="${output} ${globalprotect_icon}"
fi
echo "%{F#e7c111}$output%{F-}"
if ip route list | grep 'dev wg0 proto kernel scope link' >/dev/null; then
output="${output} ${wireguard_icon}"
fi
echo "%{F#43a047}$output%{F-}"