update from laptop

This commit is contained in:
Daniel Bauer
2018-09-04 14:39:42 +02:00
parent 73be223cd9
commit a4643f9565
37 changed files with 825 additions and 67 deletions

12
i3/scripts/spotify.py Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/python
import dbus
try:
bus = dbus.SessionBus()
spotify = bus.get_object("org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2")
spotify_iface = dbus.Interface(spotify, 'org.freedesktop.DBus.Properties')
props = spotify_iface.Get('org.mpris.MediaPlayer2.Player', 'Metadata')
print(str(props['xesam:artist'][0]) + " - " + str(props['xesam:title']))
exit
except dbus.exceptions.DBusException:
exit