Files
dotfiles/tmux/powerline/segments/np_pithos.py
2019-01-12 18:22:02 +01:00

10 lines
278 B
Python
Executable File

#!/usr/bin/env python
import dbus
pithos_bus = dbus.SessionBus()
pithos = pithos_bus.get_object('net.kevinmehall.Pithos', '/net/kevinmehall/Pithos')
props = pithos.get_dbus_method('GetCurrentSong', 'net.kevinmehall.Pithos')
print props()["artist"] + " - " + props()["title"]