1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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