diff --git a/.config/polybar/wireguard-switch.sh b/.config/polybar/wireguard-switch.sh index cdbaa31..d9fe26f 100755 --- a/.config/polybar/wireguard-switch.sh +++ b/.config/polybar/wireguard-switch.sh @@ -10,12 +10,14 @@ source "$SCRIPTPATH/wireguard-config.sh" if nmcli connection show --active | grep "$ID_LIGHT" > /dev/null then nmcli connection up "$ID_FULL" + nmcli connection down "$ID_LIGHT" exit 0 fi if nmcli connection show --active | grep "$ID_FULL" > /dev/null then - nmcli connection up "$ID_LIGHT" + nmcli connection up "$ID_LIGHT" + nmcli connection down "$ID_FULL" exit 0 fi