aboutsummaryrefslogtreecommitdiff
path: root/modules/ethernet
blob: 0ebe57209cf395c835d57d5eb9c22b181bda4caa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# Prints out if there is an ethernet cable connected

ETHERNET_ICON=''

get_ethernet()
{
    if [ -d /sys/class/net/eth? ]; then
        if [ "$(cat /sys/class/net/eth?/carrier)" == "1" ]; then
            echo "$ETHERNET_ICON"
        fi
    fi
}

get_ethernet