Skip to content

Instantly share code, notes, and snippets.

@tonytangau
Created August 20, 2018 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonytangau/bfcbaf94d6eb15c56cffada2aa734861 to your computer and use it in GitHub Desktop.
Save tonytangau/bfcbaf94d6eb15c56cffada2aa734861 to your computer and use it in GitHub Desktop.
export ZSH='/Users/tony_tang/.oh-my-zsh'
POWERLEVEL9K_MODE='awesome-patched'
ZSH_THEME="powerlevel9k/powerlevel9k"
plugins=(
git
)
source $ZSH/oh-my-zsh.sh
prompt_showSpotify () {
state=`osascript -e 'tell application "Spotify" to player state as string'`;
if [ $state = "playing" ]; then
artist=`osascript -e 'tell application "Spotify" to artist of current track as string'`;
track=`osascript -e 'tell application "Spotify" to name of current track as string'`;
echo -n " $artist - $track";
fi
}
DISABLE_AUTO_TITLE='true'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status showSpotify background_jobs time)
POWERLEVEL9K_STATUS_OK_BACKGROUND='grey'
POWERLEVEL9K_STATUS_ERROR_BACKGROUND='grey'
#POWERLEVEL9K_STATUS_VERBOSE=false
POWERLEVEL9K_SHORTEN_STRATEGY='truncate_middle'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
POWERLEVEL9K_TIME_FORMAT="%D{%Y-%m-%d \uE868 %H:%M}"
export DEFAULT_USER="$USER"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment