diff options
Diffstat (limited to '.config/polybar/mullvad_status.sh')
-rwxr-xr-x | .config/polybar/mullvad_status.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/polybar/mullvad_status.sh b/.config/polybar/mullvad_status.sh new file mode 100755 index 00000000..fbca326c --- /dev/null +++ b/.config/polybar/mullvad_status.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +MULLVAD_STATUS=$(mullvad status) + +if echo $MULLVAD_STATUS | grep -q 'Connected'; then + echo "%{u#75d85a}VPN %{T5}✅%{T-}" + elif echo $MULLVAD_STATUS | grep -q 'Connecting'; then + echo "VPN ..." + else + echo "%{u#f90000}VPN %{T5}🚫%{T-}" +fi |