Advertisement
Guest User

zsh-shpotify

a guest
Jun 29th, 2019
5,319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.11 KB | None | 0 0
  1. export ZSH="/Users/ckey/.oh-my-zsh"
  2.  
  3. plugins=(git osx)
  4.  
  5. source $ZSH/oh-my-zsh.sh
  6.  
  7. source ~/powerlevel10k/powerlevel10k.zsh-theme
  8.  
  9. prompt_zsh_showStatus () {
  10.   state=`osascript -e 'tell application "Spotify" to player state as string'`;
  11.   if [ $state = "playing" ]; then
  12.     artist=`osascript -e 'tell application "Spotify" to artist of current track as string'`;
  13.     track=`osascript -e 'tell application "Spotify" to name of current track as string'`;
  14.  
  15.       echo -n " $artist - $track " ;
  16.  
  17.   fi
  18. }
  19.  
  20. POWERLEVEL9K_CUSTOM_SPOTIFY="prompt_zsh_showStatus"
  21. POWERLEVEL9K_PROMPT_ON_NEWLINE=true
  22. POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
  23. POWERLEVEL9K_MODE='awesome-patched'
  24. POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
  25. POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
  26. POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator dir nvm vcs)
  27. POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status custom_spotify)
  28. POWERLEVEL9K_NVM_BACKGROUND='28'
  29. POWERLEVEL9K_NVM_FOREGROUND='15'
  30. POWERLEVEL9K_TIME_FORMAT="%D{%H:%M \uE868  %d.%m}"
  31. prompt_zsh_showStatus ()
  32. bindkey "^[[A" history-beginning-search-backward
  33. bindkey "^[[B" history-beginning-search-forward
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement