#!/bin/sh

#
# Copyright (c) 2000 Lars Bernhardsson, see README for licence details
#
# sample.barclock - Used to show date/time and APM status on the status bar.
#
# This is an example of how you can write a program to
# start up in the background in your .xsession before
# starting larswm. It will keep sending the current date, time
# and battery status to larswm to display on the status bar.
#

# Define the time format you want to use.
TFORMAT="%m/%d/%Y %a %H:%M:%S"


# No more configuration necessary.

while true
do
	MSG=`date "+${TFORMAT}"`
	APM=`apm`

	larsremote message "$APM  [$MSG]"

	sleep 1
done
