diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-02 23:13:28 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-02 23:13:28 +0100 |
commit | 25ce17855fd4c5d35b7e68b65c4743f2f208ccc2 (patch) | |
tree | 62e39a2a43e5a2b47d255bf1dcf4cd1253900697 /examples | |
parent | m (diff) | |
download | xpybar-25ce17855fd4c5d35b7e68b65c4743f2f208ccc2.tar.gz xpybar-25ce17855fd4c5d35b7e68b65c4743f2f208ccc2.tar.bz2 xpybar-25ce17855fd4c5d35b7e68b65c4743f2f208ccc2.tar.xz |
add moc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/plugin-test | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/plugin-test b/examples/plugin-test index 06891cf..0a0113d 100644 --- a/examples/plugin-test +++ b/examples/plugin-test @@ -13,6 +13,7 @@ from plugins.df import Discs from plugins.mem import Memory from plugins.discstats import DiscStats from plugins.xdisplay import XDisplay +from plugins.moc import MOC OUTPUT, HEIGHT, YPOS, TOP = 0, 24, 24, True @@ -148,7 +149,12 @@ def redraw(): 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) + moc_ = MOC().state + moc = {None : 'dead', MOC.STOPPED : 'stopped', MOC.PAUSED : 'paused', MOC.PLAYING : 'playing'} + moc = 'Moc: %s' % moc[moc_] + + + text = '%s │ %s │ %s │ %s │ %s │ %s %s │ %s │ %s │ %s │ %s\n%s │ %s' + text %= (time, uptime, idle, loadavg, users, uname, xdisplay, mem, swp, shm, moc, discs, discstats) bar.draw_coloured_text(0, 10, 0, 2, text) |