File: sample.barclock

package info (click to toggle)
larswm 7.0.13-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 340 kB
  • ctags: 393
  • sloc: ansic: 4,841; sh: 87; makefile: 69
file content (28 lines) | stat: -rwxr-xr-x 614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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