This is what it does now:
conn=$(nmcli -t -f NAME,TYPE con list | grep wireless | head -n 1 | awk '{print $1}')
This is what it does now:
conn=$(nmcli -t -f NAME,TYPE con list | grep wireless | head -n 1 | awk '{print $1}')