dangreco
12/29/2017 - 2:30 AM

ncmpcpp.py

import subprocess

class Py3status:

    def ncmpcpp(self):
        current = str(subprocess.check_output(['ncmpcpp', '--current-song']))
        current = current[2:len(current)-1]
        return {
            'full_text': current,
            'cached_until': self.py3.time_in(.5)
        }