aboutsummaryrefslogtreecommitdiffstats
path: root/examples/plugins/moc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-03-29 01:06:31 +0100
committerMattias Andrée <maandree@operamail.com>2015-03-29 01:06:31 +0100
commitf3f76e9b47492b60f9fc6e7735be332d36b97eaa (patch)
tree85bbc01a3c11b65790e839fa578c618336075191 /examples/plugins/moc
parentadd get_event_mask and get_override_redirect (diff)
downloadxpybar-f3f76e9b47492b60f9fc6e7735be332d36b97eaa.tar.gz
xpybar-f3f76e9b47492b60f9fc6e7735be332d36b97eaa.tar.bz2
xpybar-f3f76e9b47492b60f9fc6e7735be332d36b97eaa.tar.xz
small fixes
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples/plugins/moc')
-rw-r--r--examples/plugins/moc6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/plugins/moc b/examples/plugins/moc
index 414323e..b572186 100644
--- a/examples/plugins/moc
+++ b/examples/plugins/moc
@@ -9,7 +9,7 @@ from plugins.moc import MOC
from plugins.clock import Clock
-OUTPUT, HEIGHT, YPOS, TOP = 0, 12, 24, True
+OUTPUT, HEIGHT, YPOS, TOP = 0, 24, 24, True
clock = Clock(sync_to = Clock.SECONDS)
@@ -20,15 +20,17 @@ def start():
async(lambda : clock.continuous_sync(lambda : bar.invalidate()))
+line2 = ['File', 'Title', 'SongTitle', 'Album', 'Artist']
def redraw():
moc_ = MOC()
text = ''
if moc_.state in [MOC.PAUSED, MOC.PLAYING]:
- text = ' │ ' + ' │ '.join(['%s: %s' % (key, moc_[keys]) for key in moc_.keys()])
+ text = ' │ ' + ' │ '.join(['%s: %s' % (key, moc_[key]) for key in moc_.keys() if key not in line2])
text = 'State: %s%s' % ({MOC.NOT_RUNNING : 'not running',
MOC.STOPPED : 'stopped',
MOC.PAUSED : 'paused',
MOC.PLAYING : 'playing'}[moc_.state], text)
+ text += '\n' + ' │ '.join(['%s: %s' % (key, moc_[key]) for key in moc_.keys() if key in line2])
bar.clear()
bar.draw_coloured_text(0, 10, 0, 2, text)