#!/bin/bash

# wminfo plugin: uptime, users, and load average

# command: wminfo -p conky.uptime.wmi -u 6 -b#000000 -f#ff0000

datafile="$HOME/.wminfo/conky.tmp"
label="UPTIME"

if [ -z "$(grep "^${label}: " "${datafile}")" ]
then
cat <<EOF
$0: no "${label}" entries were found in ${datafile} file.
         
         
         
         
EOF
    exit
fi

uptime=`grep "^${label}: " $datafile`

uptime=${uptime//${label}: /\\n}
uptime=${uptime/UPT: /}

echo -e $uptime
echo

