Created
August 4, 2015 06:24
-
-
Save youvegotmoxie/a39ab4c218880024438d to your computer and use it in GitHub Desktop.
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
| # Control iTunes from command line | |
| # Play iTunes | |
| function iplay() { | |
| osascript -e 'tell application "iTunes" to play' | |
| } | |
| # Pause iTunes | |
| function ipause() { | |
| osascript -e 'tell application "iTunes" to pause' | |
| } | |
| # Skip to next track | |
| function inext() { | |
| osascript -e 'tell application "iTunes" to next track' | |
| } | |
| # Skip to previous track | |
| function iprev() { | |
| osascript -e 'tell application "iTunes" to previous track' | |
| } | |
| # Display iTunes status, current artist and track | |
| function istatus() { | |
| 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'` | |
| echo "Current track $artist: $track" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment