From 6c8cb02af0573bce2caab988c1fea58921519e18 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 2 Mar 2014 09:30:00 +0100 Subject: add xdisplay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/plugin-test | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/plugin-test') diff --git a/examples/plugin-test b/examples/plugin-test index 3fce9bc..06891cf 100644 --- a/examples/plugin-test +++ b/examples/plugin-test @@ -12,6 +12,7 @@ from plugins.uname import Uname from plugins.df import Discs from plugins.mem import Memory from plugins.discstats import DiscStats +from plugins.xdisplay import XDisplay OUTPUT, HEIGHT, YPOS, TOP = 0, 24, 24, True @@ -145,7 +146,9 @@ def redraw(): discstats = ['%s:%s' % (d[2:], colourise(i)) for d, i in discstats] discstats = 'Disc stats: %s' % (' '.join(discstats)) - text = '%s │ %s │ %s │ %s │ %s │ %s │ %s │ %s │ %s\n%s │ %s' - text %= (time, uptime, idle, loadavg, users, uname, mem, swp, shm, discs, discstats) + xdisplay = ':%i' % XDisplay().display + + text = '%s │ %s │ %s │ %s │ %s │ %s %s │ %s │ %s │ %s\n%s │ %s' + text %= (time, uptime, idle, loadavg, users, uname, xdisplay, mem, swp, shm, discs, discstats) bar.draw_coloured_text(0, 10, 0, 2, text) -- cgit v1.2.3-70-g09d2