def get_info(self):
        """Return a dictionary with info about the current MOC status."""
        try:
            output = self.call_process(["mocp", "-i"])
        except subprocess.CalledProcessError as err:
            output = err.output
        if output.startswith("State"):
            output = output.splitlines()
            info = {"State": "", "File": "", "SongTitle": "", "Artist": "", "Album": ""}

            for line in output:
                for data in info:
                    if data in line:
                        info[data] = line[len(data) + 2 :].strip()
                        break
            return info
Return a dictionary with info about the current MOC status.
libqtile/widget/moc.py