Skip to content

Instantly share code, notes, and snippets.

@scottjacksonx
Created April 8, 2010 02:01
Show Gist options
  • Save scottjacksonx/359701 to your computer and use it in GitHub Desktop.
Save scottjacksonx/359701 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Gives you a Growl notification telling you details about the currently playing track in iTunes.
artist=`osascript -e 'tell application "iTunes" to artist of current track as string'`;
track=`osascript -e 'tell application "iTunes" to name of current track as string'`;
album=`osascript -e 'tell application "iTunes" to album of current track as string'`;
/usr/local/bin/growlnotify -t "Currently Playing" -m "Artist: $artist
Track: $track
Album: $album" -a "iTunes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment