aboutsummaryrefslogtreecommitdiff
path: root/byobu/.byobu/bin/15_load.sh
blob: 1168d1a7ea9cb3b8120ff984853073ac17ba8184 (plain)
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