Add lemonbar config and block scripts

This commit is contained in:
Riyyi
2019-05-01 22:50:36 +02:00
parent 6233d49805
commit 989c258a67
9 changed files with 304 additions and 6 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
ICON=""
WIRED="${1:-eth0}"
COLOR="-"
if [ ! -d /sys/class/net/${WIRED} ] ||
[ "$(cat /sys/class/net/$WIRED/operstate)" = 'down' ] ||
[ "$(ip a | grep $WIRED | awk '/inet / {print $2}')" = "" ]; then
COLOR="$COLOR7"
else
COLOR="$COLOR15"
fi
printf "%s\n" "iface%{F$COLOR}$ICON%{F-}"