def now_playing(self):
        """Return a string with the now playing info."""
        info = self.get_info()
        now_playing = ""
        if info:
            display_format = self.format
            status = info["status"]
            if self.status != status:
                self.status = status
                if self.status == "playing":
                    self.layout.colour = self.playing_color
                elif self.status == "paused":
                    self.layout.colour = self.paused_color
                else:
                    self.layout.colour = self.stopped_color
            self.local = info["file"].startswith("/")
            if self.local:
                if not info["title"]:
                    info["title"] = info["file"].split("/")[-1]
                if not info["artist"]:
                    display_format = self.no_artist_format
            elif info["stream"]:
                display_format = self.stream_format
            # Handle case if cmus was started and no file is selected yet
            elif not info["file"]:
                display_format = ""
            now_playing = display_format.format(**info)
            if now_playing.strip() == info["status_text"].strip():
                now_playing = ""

        return pangocffi.markup_escape_text(now_playing)
Return a string with the now playing info.
libqtile/widget/cmus.py