about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-08-03 21:20:59 +0200
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-08-03 21:20:59 +0200
commitf02b1fc1de4a2916ef3321b98ba40a8d00f5a072 (patch)
tree0b39a21fc76581bb7fe9f4a9d546ce5cfc307b04
parentPrepare to add ethernet checking dwm-status part 2 (diff)
downloaddwm-f02b1fc1de4a2916ef3321b98ba40a8d00f5a072.tar.gz
dwm-f02b1fc1de4a2916ef3321b98ba40a8d00f5a072.tar.bz2
dwm-f02b1fc1de4a2916ef3321b98ba40a8d00f5a072.zip
Added ethernet icon dwm-status
-rwxr-xr-xscripts/dwm-status7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/dwm-status b/scripts/dwm-status
index 3981255..1293ba8 100755
--- a/scripts/dwm-status
+++ b/scripts/dwm-status
@@ -70,9 +70,10 @@ tor() {
 
 network() {
 
-	#Add ethernet checking (plugged in) Icon(s):  
-	#If this contains a 1 /sys/class/net/eth?/carrier:0/1
-	# https://stackoverflow.com/questions/808560/how-to-detect-the-physical-connected-state-of-a-network-cable-connector
+	if [ "$(cat /sys/class/net/eth?/carrier)" == "1" ]; then
+		echo "" # 
+		echo "$delim"
+	fi
 
 	if grep -q wlan* "/proc/net/wireless"; then