Added iTunes current track.

Also found out that I can put each of these in separate variables and
then include them, making it easier to maintain
This commit is contained in:
Nick Nisi
2012-06-13 16:23:41 -05:00
parent 437d49175e
commit 6a300385fb
2 changed files with 28 additions and 2 deletions

12
bin/itunes.applescript Normal file
View File

@@ -0,0 +1,12 @@
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

View File

@@ -106,12 +106,26 @@ set-option -g display-panes-colour colour166
# clock
set-window-option -g clock-mode-colour colour39
#
##################
#### Plugins #####
##################
# current Spotify track
spotify_track='#[fg=colour82]#(osascript ~/.dotfiles/bin/spotify.applescript)'
# current iTunes track
itunes_track='#[fg=colour27]#(osascript ~/.dotfiles/bin/itunes.applescript)'
tm_date='#[fg=colour245]⮃ %R ⮃ %d %b'
tm_host='#[fg=colour39,bg=colour234,bold]#h'
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
set -g window-status-format "#[fg=colour239,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour16,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
set -g status-left '#[fg=colour39,bg=colour234,bold] #S'
set -g status-right '#[fg=colour82]#(osascript ~/.dotfiles/bin/spotify.applescript) #[fg=colour245]⮃ %R ⮃ %d %b #[fg=colour39,bg=colour234,bold] #h '
set -g status-right $itunes_track' '$spotify_track' '$tm_date' '$tm_host