mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-23 13:32:53 +00:00
17 lines
278 B
Text
17 lines
278 B
Text
|
#!/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
|