aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/connection
blob: 277dedf182029f7444136c2a85471bf082fb4529 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

internet=$(nmcli g | sed -n 2p | awk '{print $1}')
if [[ $internet == "connected" ]]
then
    con=$(nmcli | grep "connected to" | sed "s/.*: connected to \(.*\)/\1/g")
    echo "" $con
elif [[ $internet == "disconnected" ]]
then
    echo ""
else
    echo " Not Connected"
fi