Skip to content

Instantly share code, notes, and snippets.

@tarla
Last active January 3, 2022 09:20
Show Gist options
  • Save tarla/48756a3f03141f108139f3c2b8cafcdb to your computer and use it in GitHub Desktop.
Save tarla/48756a3f03141f108139f3c2b8cafcdb to your computer and use it in GitHub Desktop.
Custom zsh theme with M1/x86 label
# CUSTOM geoffgarside theme
# .oh-my-zsh/themes/geoffgarside.zsh-theme
declare -A archs
archs=(
["arm64"]="$bg_bold[cyan]%}%{$fg_bold[white]%}m1%{$reset_color%}"
["x86_64"]="$bg_bold[yellow]%}%{$fg_bold[white]%}x86%{$reset_color%}"
)
arch=$(uname -m)
label=$archs[$arch]
# PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) "
PROMPT='[%*] $label %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment