aboutsummaryrefslogtreecommitdiff
path: root/byobu/.byobu/bin/15_load.sh
diff options
context:
space:
mode:
Diffstat (limited to 'byobu/.byobu/bin/15_load.sh')
-rwxr-xr-xbyobu/.byobu/bin/15_load.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/byobu/.byobu/bin/15_load.sh b/byobu/.byobu/bin/15_load.sh
new file mode 100755
index 0000000..1168d1a
--- /dev/null
+++ b/byobu/.byobu/bin/15_load.sh
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+BLACK="\033[00m"
+YELLOW="\033[1;33m"
+
+load=`cat /proc/loadavg | sed -e 's/ .*//'`
+[ -n "$load" ] || return
+
+if [ $(echo "$load < 0.5" | bc) = 1 ]
+then
+ return
+ printf "<0.5"
+else
+
+ printf "#[bg=#FFFF00]$load"
+ echo
+fi