From 719e8154fa476e64c476593e630f3bf95131d3fa Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Wed, 13 Jun 2012 11:37:52 -0500 Subject: [PATCH] Added spotify current track to tmux toolbar --- bin/spotify.applescript | 12 ++++++++++++ tmux/tmux.conf.symlink | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 bin/spotify.applescript diff --git a/bin/spotify.applescript b/bin/spotify.applescript new file mode 100644 index 0000000..309d873 --- /dev/null +++ b/bin/spotify.applescript @@ -0,0 +1,12 @@ +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 diff --git a/tmux/tmux.conf.symlink b/tmux/tmux.conf.symlink index e971a5c..58042bf 100644 --- a/tmux/tmux.conf.symlink +++ b/tmux/tmux.conf.symlink @@ -113,5 +113,5 @@ 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=colour245]⮃ %R ⮃ %d %b #[fg=colour39,bg=colour234,bold] #h ' +set -g status-right '#[fg=colour39]#(osascript ~/.dotfiles/bin/spotify.applescript) #[fg=colour245]⮃ %R ⮃ %d %b #[fg=colour39,bg=colour234,bold] #h '