aboutsummaryrefslogtreecommitdiffstats
path: root/examples/plugin-test
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-02 09:30:00 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-02 09:30:00 +0100
commit6c8cb02af0573bce2caab988c1fea58921519e18 (patch)
tree6db08e95d586ab34dbb855e6aeb4d1bae69fac83 /examples/plugin-test
parentupdate todo (diff)
downloadxpybar-6c8cb02af0573bce2caab988c1fea58921519e18.tar.gz
xpybar-6c8cb02af0573bce2caab988c1fea58921519e18.tar.bz2
xpybar-6c8cb02af0573bce2caab988c1fea58921519e18.tar.xz
add xdisplay
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--examples/plugin-test7
1 files changed, 5 insertions, 2 deletions
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)