From 2dd809781527976307b47a598887062047e202c9 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Thu, 20 Apr 2017 19:37:10 -0600 Subject: Making tmux configuration much easier to manage --- segments/np_itunes.script | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 segments/np_itunes.script (limited to 'segments/np_itunes.script') diff --git a/segments/np_itunes.script b/segments/np_itunes.script deleted file mode 100755 index 8ac66bd..0000000 --- a/segments/np_itunes.script +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env osascript -# Returns the current playing song in iTunes for OSX - -tell application "System Events" - set process_list to (name of every process) -end tell - -if process_list contains "iTunes" then - tell application "iTunes" - if player state is playing then - set track_name to name of current track - set artist_name to artist of current track - # set album_name to album of current track - set trim_length to 40 - set now_playing to artist_name & " - " & track_name - if length of now_playing is less than trim_length then - set now_playing_trim to now_playing - else - set now_playing_trim to characters 1 thru trim_length of now_playing as string - end if - end if - end tell -end if - -- cgit v1.2.3