Created
June 8, 2012 10:19
-
-
Save melo/2894863 to your computer and use it in GitHub Desktop.
What is the music playing? \cc @consttype :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# hat tip to @consttype: https://twitter.com/#!/consttype/status/211035411026427904 | |
osascript -e 'tell application "iTunes" to pause' | |
x='tell application "iTunes" to get' | |
y='of current track as string' | |
say Title is `osascript -e "$x name $y"` . Author is `osascript -e "$x artist $y"` | |
osascript -e 'tell application "iTunes" to play' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment