Added color scripts

This commit is contained in:
2018-12-14 21:53:13 -05:00
parent a1fb583fbe
commit b1aa0c2198
16 changed files with 236 additions and 50 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
. "/home/kevin/.cache/wal/colors.sh"
printf "$(spotify-now -i '%artist - %title')\n\n%s\n" "$color7"
printf "$(spotify-now -i '%artist - %title' -p '' -e '')\n\n%s\n" "$color7"

View File

@@ -1,16 +0,0 @@
#!/usr/bin/python
import dbus
import os
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')
song_str = str(props['xesam:artist'][0]) + " - " + str(props['xesam:title'])
print("{}\n\n{}\n".format(song_str, os.environ['COLOR7']))
# print('COLOR7' in os.environ)
exit
except dbus.exceptions.DBusException:
exit