Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save 2600box/5c3838873b882f4c6730afc0e40db7f0 to your computer and use it in GitHub Desktop.

Select an option

Save 2600box/5c3838873b882f4c6730afc0e40db7f0 to your computer and use it in GitHub Desktop.

Revisions

  1. @LucaTNT LucaTNT revised this gist Feb 1, 2017. No changes.
  2. @LucaTNT LucaTNT created this gist Feb 1, 2017.
    14 changes: 14 additions & 0 deletions iTunes-now-playing-on-TouchBar.scpt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    -- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar
    -- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar

    if application "iTunes" is running then
    tell application "iTunes"
    if player state is playing then
    return (get artist of current track) & " - " & (get name of current track)
    else
    return ""
    end if
    end tell
    else
    return ""
    end if