Mercurial > vixm
comparison vixm/control.py @ 17:1c769ae67af4 v0.12
Implemented the zxcvb xmms controls
In case you are playing a crapy song and you want to skip it.
Play/Pause/Stop are useful as well. Previous is little odd, but it is
provided for completeness.
author | Josef "Jeff" Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 20 Aug 2006 00:19:41 -0400 |
parents | 447b47ab396f |
children | a3385f616b53 |
comparison
equal
deleted
inserted
replaced
16:447b47ab396f | 17:1c769ae67af4 |
---|---|
1 import xmms | |
2 | |
1 import playlist, util | 3 import playlist, util |
2 | 4 |
3 def cmd_quit(ui, start, stop, args): | 5 def cmd_quit(ui, start, stop, args): |
4 ui.shutdown = True | 6 ui.shutdown = True |
5 | 7 |
87 | 89 |
88 print "%s%s (%s)" % (pfx, s["title"], | 90 print "%s%s (%s)" % (pfx, s["title"], |
89 util.strtime(s["time"])) | 91 util.strtime(s["time"])) |
90 i += 1 | 92 i += 1 |
91 | 93 |
94 def cmd_play(ui, start, stop, args): | |
95 xmms.control.play() | |
96 | |
97 def cmd_pause(ui, start, stop, args): | |
98 xmms.control.pause() | |
99 | |
100 def cmd_stop(ui, start, stop, args): | |
101 xmms.control.stop() | |
102 | |
103 def cmd_prev(ui, start, stop, args): | |
104 xmms.control.playlist_prev() | |
105 | |
106 def cmd_next(ui, start, stop, args): | |
107 xmms.control.playlist_next() | |
108 |