# HG changeset patch # User Josef "Jeff" Sipek # Date 1156112509 14400 # Node ID 2efd6bbb1694a951f95e01b77a9e04331945199e # Parent ad17f7d6728fd0f4f3647f698e5789910a46c168 Implemented location command ('=') diff -r ad17f7d6728f -r 2efd6bbb1694 vixm/control.py --- a/vixm/control.py Sun Aug 20 12:30:31 2006 -0400 +++ b/vixm/control.py Sun Aug 20 18:21:49 2006 -0400 @@ -155,3 +155,12 @@ os.system(args[0]) print "!" +def cmd_location(ui, start, stop, args): + """= + - Display information about currently playing song""" + pos = xmms.control.get_playlist_pos() + current = ui.lists[playlist.LIST_DEFAULT][pos] + + print "%d. %s (%s)" % (pos+1, current["title"], + util.strtime(current["time"])) + diff -r ad17f7d6728f -r 2efd6bbb1694 vixm/ui.py --- a/vixm/ui.py Sun Aug 20 12:30:31 2006 -0400 +++ b/vixm/ui.py Sun Aug 20 18:21:49 2006 -0400 @@ -154,6 +154,9 @@ "!(.*)": (control.cmd_shell, False), + "=": + (control.cmd_location, + False), } def __cmd(self, txt):