#!/bin/sh # periodically print date and load average to the bar xwrite() { file="$1"; shift echo -n "$@" | wmiir write "$file" } wmiir remove /bar/status 2>/dev/null && sleep 2 wmiir create /bar/status xwrite /bar/status/colors $WMII_NORMCOLORS while xwrite /bar/status/data `~/bin/battery-state` \| `~/bin/cur-network` \| `date` \| `uptime | sed 's/.*://; s/,//g'` do sleep 10 done