aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlemonbar/bin/get_network_info.sh25
-rwxr-xr-xlemonbar/bin/lemonbar_inputbin0 -> 2674440 bytes
-rw-r--r--src/lemonbar/input.go (renamed from lemonbar/src/main.go)0
3 files changed, 25 insertions, 0 deletions
diff --git a/lemonbar/bin/get_network_info.sh b/lemonbar/bin/get_network_info.sh
new file mode 100755
index 0000000..f85b0f6
--- /dev/null
+++ b/lemonbar/bin/get_network_info.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+
+for DEV in `ip -o addr | awk '{if($2 != "lo" && $3 == "inet"){print $2}}'`
+do
+ SSID=""
+ OUTPUT=""
+ ADDR=`ip addr show dev "$DEV" | grep -E "inet[^6]" \
+ | awk '{print $2}'`
+ MATCH=`expr "$DEV" : "^wlp"`
+ if test "$MATCH" -gt 0
+ then
+ SSID=`iw dev "$DEV" link | grep SSID | awk '{print $2}'`
+ SSID="$SSID: "
+ fi
+
+ if test -n "$OUTPUT"
+ then
+ OUTPUT="$OUTPUT | ($DEV) $SSID$ADDR"
+ else
+ OUTPUT="($DEV) $SSID$ADDR"
+ fi
+done
+
+echo "$OUTPUT"
diff --git a/lemonbar/bin/lemonbar_input b/lemonbar/bin/lemonbar_input
new file mode 100755
index 0000000..cf8fb83
--- /dev/null
+++ b/lemonbar/bin/lemonbar_input
Binary files differ
diff --git a/lemonbar/src/main.go b/src/lemonbar/input.go
index 302d457..302d457 100644
--- a/lemonbar/src/main.go
+++ b/src/lemonbar/input.go