Commit e237dd92bb1bfc887432b39ee65aca17dcbe94b9

Thomas de Grivel 2020-06-24T20:01:26

fix load and add egress_interface to status

diff --git a/bin/egress_interface b/bin/egress_interface
new file mode 100755
index 0000000..2833af6
--- /dev/null
+++ b/bin/egress_interface
@@ -0,0 +1 @@
+ifconfig egress | head -n 1 | cut -d : -f 1
diff --git a/bin/load b/bin/load
index bb447de..87bbe1f 100755
--- a/bin/load
+++ b/bin/load
@@ -1,2 +1,2 @@
 #!/bin/sh
-uptime | cut -d : -f 3 | cut -c 2-
+uptime | egrep -o 'load averages: .*' | cut -d : -f 2 | cut -c 2-
diff --git a/bin/status b/bin/status
index b9a06bd..f603a44 100755
--- a/bin/status
+++ b/bin/status
@@ -1,2 +1,2 @@
 #!/bin/sh
-xsetroot -name "$(hostname) $(~/bin/host-ip) $(~/bin/nwid) $(~/bin/load) $(~/bin/temperature) $(~/bin/battery)$(~/bin/plugged) $(date)"
+xsetroot -name "$(hostname) $(~/bin/egress_interface) $(~/bin/host-ip) $(~/bin/nwid) $(~/bin/load) $(~/bin/temperature) $(~/bin/battery)$(~/bin/plugged) $(date)"