This commit is contained in:
2019-01-12 18:22:02 +01:00
commit ef6928d257
81 changed files with 6009 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/usr/bin/env osascript
# Returns the current playing song in Spotify for OSX
tell application "System Events"
set process_list to (name of every process)
end tell
if process_list contains "Spotify" then
tell application "Spotify"
if player state is playing or player state is paused then
set track_name to name of current track
set artist_name to artist of current track
#set album_name to album of current track
set trim_length to 40
if player state is playing then
set now_playing to "► " & artist_name & " - " & track_name
else
set now_playing to "❙❙ " & artist_name & " - " & track_name
end if
if length of now_playing is less than trim_length then
set now_playing_trim to now_playing
else
set now_playing_trim to characters 1 thru trim_length of now_playing as string
end if
end if
end tell
end if