Skip to content

Instantly share code, notes, and snippets.

@nsbgn
nsbgn / mpris.py
Last active March 11, 2018 13:57
Monitor currently playing song, for statusbars
#!/usr/bin/env python3
# This script continuously outputs the currently playing song and play status.
# For use with i3blocks, polybar, yabar etc; to avoid polling
# Note that there is an MPRIS plugin to control and monitor MPV through
# DBUS, at https://github.com/hoyon/mpv-mpris
# See also:
# https://github.com/mariusor/mpris-ctl
# https://github.com/acrisci/playerctl