mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-03-15 01:55:25 +00:00
[polybar] Add wireguard to check_vpn
This commit is contained in:
parent
40310a71e5
commit
cb37621f00
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
openvpn_icon="%{T2}%{T-}"
|
openvpn_icon="%{T2}%{T-}"
|
||||||
globalprotect_icon="%{T2}%{T-}"
|
globalprotect_icon="%{T2}%{T-}"
|
||||||
|
wireguard_icon="%{T2}%{T-}"
|
||||||
|
|
||||||
output=""
|
output=""
|
||||||
if pgrep openvpn >/dev/null; then
|
if pgrep openvpn >/dev/null; then
|
||||||
@ -12,4 +13,8 @@ if pgrep gpclient >/dev/null; then
|
|||||||
output="${output} ${globalprotect_icon}"
|
output="${output} ${globalprotect_icon}"
|
||||||
fi
|
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-}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user