Remove rdio support, combine spotify and itunes
* remove rdio.scpt for detecting currently playing rdio trip. RIP * combine iTunes and Spotify scripts together into a single, tunes.scpt
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
if application "iTunes" is running then
|
|
||||||
tell application "iTunes"
|
|
||||||
if exists current track then
|
|
||||||
set theName to the name of the current track
|
|
||||||
set theArtist to the artist of the current track
|
|
||||||
try
|
|
||||||
return "♫ " & theName & " - " & theArtist
|
|
||||||
on error err
|
|
||||||
end try
|
|
||||||
end if
|
|
||||||
end tell
|
|
||||||
end if
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
if application "Rdio" is running then
|
|
||||||
tell application "Rdio"
|
|
||||||
set theName to name of the current track
|
|
||||||
set theArtist to artist of the current track
|
|
||||||
try
|
|
||||||
return "♫ " & theName & " - " & theArtist
|
|
||||||
on error err
|
|
||||||
end try
|
|
||||||
end tell
|
|
||||||
end if
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
if application "Spotify" is running then
|
|
||||||
tell application "Spotify"
|
|
||||||
set theName to name of the current track
|
|
||||||
set theArtist to artist of the current track
|
|
||||||
set theAlbum to album of the current track
|
|
||||||
set theUrl to spotify url of the current track
|
|
||||||
try
|
|
||||||
return "♫ " & theName & " - " & theArtist
|
|
||||||
on error err
|
|
||||||
end try
|
|
||||||
end tell
|
|
||||||
end if
|
|
||||||
24
applescripts/tunes.scpt
Executable file
24
applescripts/tunes.scpt
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
(* Get the current song from iTunes or Spotify *)
|
||||||
|
if application "iTunes" is running then
|
||||||
|
tell application "iTunes"
|
||||||
|
if exists current track then
|
||||||
|
set theName to the name of the current track
|
||||||
|
set theArtist to the artist of the current track
|
||||||
|
try
|
||||||
|
return "♫ " & theName & " - " & theArtist
|
||||||
|
on error err
|
||||||
|
end try
|
||||||
|
end if
|
||||||
|
end tell
|
||||||
|
else if application "Spotify" is running then
|
||||||
|
tell application "Spotify"
|
||||||
|
set theName to name of the current track
|
||||||
|
set theArtist to artist of the current track
|
||||||
|
set theAlbum to album of the current track
|
||||||
|
set theUrl to spotify url of the current track
|
||||||
|
try
|
||||||
|
return "♫ " & theName & " - " & theArtist
|
||||||
|
on error err
|
||||||
|
end try
|
||||||
|
end tell
|
||||||
|
end if
|
||||||
@@ -49,9 +49,7 @@ set-option -g display-panes-colour $tm_color_inactive
|
|||||||
# clock
|
# clock
|
||||||
set-window-option -g clock-mode-colour $tm_color_active
|
set-window-option -g clock-mode-colour $tm_color_active
|
||||||
|
|
||||||
tm_spotify="#[fg=$tm_color_music]#(osascript ~/.dotfiles/applescripts/spotify.scpt)"
|
tm_tunes="#[fg=$tm_color_music]#(osascript ~/.dotfiles/applescripts/tunes.scpt)"
|
||||||
tm_itunes="#[fg=$tm_color_music]#(osascript ~/.dotfiles/applescripts/itunes.scpt)"
|
|
||||||
tm_rdio="#[fg=$tm_color_music]#(osascript ~/.dotfiles/applescripts/rdio.scpt)"
|
|
||||||
tm_battery="#(~/.dotfiles/bin/battery_indicator.sh)"
|
tm_battery="#(~/.dotfiles/bin/battery_indicator.sh)"
|
||||||
|
|
||||||
tm_date="#[fg=$tm_color_inactive] %R %d %b"
|
tm_date="#[fg=$tm_color_inactive] %R %d %b"
|
||||||
@@ -59,4 +57,4 @@ tm_host="#[fg=$tm_color_feature,bold]#h"
|
|||||||
tm_session_name="#[fg=$tm_color_feature,bold]$tm_icon #S"
|
tm_session_name="#[fg=$tm_color_feature,bold]$tm_icon #S"
|
||||||
|
|
||||||
set -g status-left $tm_session_name' '
|
set -g status-left $tm_session_name' '
|
||||||
set -g status-right $tm_itunes' '$tm_date' '$tm_host
|
set -g status-right $tm_tunes' '$tm_date' '$tm_host
|
||||||
|
|||||||
Reference in New Issue
Block a user