Files
dotfiles/applescripts/tunes.scpt
Nick Nisi dd9a29fd4f remove spotify song from tmux
This code breaks if Spotify isn't installed, so just removing it
2016-03-29 11:36:59 -07:00

14 lines
382 B
AppleScript
Executable File

(* Get the current song from iTunes or Spotify *)
if application "iTunes" is running then
tell application "iTunes"
if exists current track then
set theName to the name of the current track
set theArtist to the artist of the current track
try
return "♫ " & theName & " - " & theArtist
on error err
end try
end if
end tell
end if