From 01d5043106dbc8d5b0a63024d0c2a81b1ee63bb9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 3 Mar 2014 14:08:00 +0100 Subject: add clock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/plugin-test | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'examples/plugin-test') diff --git a/examples/plugin-test b/examples/plugin-test index 619b6f5..9cf449c 100644 --- a/examples/plugin-test +++ b/examples/plugin-test @@ -16,13 +16,17 @@ from plugins.discstats import DiscStats from plugins.xdisplay import XDisplay from plugins.moc import MOC from plugins.cpu import CPU +from plugins.clock import Clock OUTPUT, HEIGHT, YPOS, TOP = 0, 24, 24, True +clock = Clock(format = '%Y-(%m)%b-%d %T, %a w%V, %Z') + + def redraw(): - date = spawn_read('date', '+%Y-(%m)%b-%d %T, %a w%V, %Z') + date = clock.read() uptime_ = Uptime() uptime = '%id %02i:%02i:%05.2f' % uptime_.uptime -- cgit v1.2.3-70-g09d2