Mercurial > audlegacy
diff contrib/g15_audacious.py @ 3270:30ed2878807f trunk
merged with master
author | Ben Tucker <ben.tucker@gmail.com> |
---|---|
date | Tue, 07 Aug 2007 18:07:37 -0700 |
parents | 3c3a3f3c2269 |
children | 7a4fcf84a34f |
line wrap: on
line diff
--- a/contrib/g15_audacious.py Sat Aug 04 01:15:07 2007 -0700 +++ b/contrib/g15_audacious.py Tue Aug 07 18:07:37 2007 -0700 @@ -10,6 +10,7 @@ - Every second update should skip the D-Bus calls. They are the biggest CPU drain. (I also only use a half-second update interval for the scroller. Feel free to turn it off and use a 1-second interval. +- Wipe and redraw the entire screen at songchange. I'm not sure why yet, but some songs can cause mess-ups. - Clean up this quick hack of a script. Notes for people hacking this script: @@ -34,6 +35,11 @@ "0110000" + "0100000" ) +# 3x5 "Characters" (Icon glyphs sized to match the Small font) +CHAR_S_NOTE = "011010010110110" +CHAR_S_HALFTONE = "101010101010101" +CHAR_S_CROSS = "000010111010000" + # I prefer no icon when it's playing, so overwrite the play icon with a blank. ICN_PLAY = '0' * ICON_DIMS[0] * ICON_DIMS[1] @@ -109,6 +115,11 @@ msg_handle.write('PB 0 9 160 14 0 1 1\n') # Wipe away any remnants of the old title that wouldn't be overwritten. msg_handle.write('TO 0 9 0 0 "%s"\n' % titleString) + # Uncomment to place a note in the gap where the scroller wraps around + #notePos = (len(titleString) - scrollPivot - 1) * 4 + #if len(titleString) > 40 and notePos <= 156: + # msg_handle.write('PO %d 9 3 5 "%s"\n' % (notePos, CHAR_S_NOTE)) + # Volume bar msg_handle.write('DB 29 28 159 29 1 %d 100 1\n' % ((volume[0] + volume[1])/2))