From cb37621f0084045a28947312a0ccfc09d2859b84 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Tue, 4 Mar 2025 17:39:06 +0100 Subject: [PATCH] [polybar] Add wireguard to check_vpn --- .config/polybar/scripts/check_vpn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/polybar/scripts/check_vpn b/.config/polybar/scripts/check_vpn index 8d19019..ce6bcf1 100755 --- a/.config/polybar/scripts/check_vpn +++ b/.config/polybar/scripts/check_vpn @@ -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-}"