#!/usr/bin/env bash

internet=$(nmcli g | awk 'NR == 2 {print $1}')
if [[ $internet == "connected" ]]
then
    con=$(nmcli | awk -F "to " '/connected to/ { print $2 }')
    echo "" $con
else
    echo ""
fi
