Created
October 27, 2021 19:16
-
-
Save joshdholtz/d1a7295c51e031a8de7e11c36f25ab61 to your computer and use it in GitHub Desktop.
Josh's M1 Mac Development Environment - homebrew, zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.zshrc | |
ZSH_DISABLE_COMPFIX=true | |
export ZSH="/Users/joshholtz/.oh-my-zsh" | |
# joshdholtz theme shows arch type in the prompt | |
ZSH_THEME="joshdholtz" | |
plugins=(git) | |
source $ZSH/oh-my-zsh.sh | |
# M1 and Rosetta | |
alias mzsh="arch -arm64 zsh" | |
alias izsh="arch -x86_64 zsh" | |
if [ "$(uname -p)" = "i386" ]; then | |
echo "Running in i386 mode (Rosetta)" | |
eval "$(/usr/local/homebrew/bin/brew shellenv)" | |
alias brew='/usr/local/homebrew/bin/brew' | |
else | |
echo "Running in ARM mode (M1)" | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
alias brew='/opt/homebrew/bin/brew' | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.oh-my-zsh/themes/joshdholtz.zsh-theme | |
PROMPT="%(?:%{$fg_bold[green]%}➜ $(arch) :%{$fg_bold[red]%}➜ )" | |
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment