Terminal Setup
Set shell to zsh
Install homebrew
Add to path
Install Alacritty -- do this either from brew or online.
Install Git and likely the developer tools if they are not installed.
Configure Alacritty
mkdir -p ~/.config/alacritty
cd ~/.config/alacritty
touch alacritty.toml
git clone https://github.com/alacritty/alacritty-theme themes
Edit the config file - Note this may throw an error because the font is not installed yet. It's safe to ignore. (> code ~/.config/alacritty/alacritty.toml)
#import = [
# "~/.config/alacritty/themes/themes/breeze.toml"
#]
[env]
TERM = "xterm-256color"
[window]
padding.x = 10
padding.y = 10
decorations = "full"
#opacity = 0.7
blur = true
option_as_alt = "Both"
[font.normal]
family = "FiraMono Nerd Font"
[font]
size = 14
Install zsh-autsuggestions
brew install zsh-autosuggestions
echo "source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
source ~/.zshrc
Install zsh-syntax-highlighting
brew install zsh-syntax-highlighting
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
source ~/.zshrc
Here's my zsh profile (Updated 8/9/2024)
(> code ~/.zshrc)
function gam() { "/Users/$USER/bin/gam/gam" "$@" ; }
NEW_LINE=$'\n'
# Load version control information
autoload -Uz vcs_info
precmd() { vcs_info }
# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats 'on branch %b'
# Set up the prompt (with git branch name)
setopt PROMPT_SUBST
PROMPT='%n in ${PWD/#$HOME/~} ${vcs_info_msg_0_} ${NEW_LINE} # '
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="/opt/homebrew/opt/[email protected]/sbin:$PATH"
eval "$(pyenv init -)"
# Created by `pipx` on 2024-05-30 16:18:36
export PATH="$PATH:/Users/$USER/.local/bin"
if [ -f "/Users/$USER/.config/fabric/fabric-bootstrap.inc" ]; then . "/Users/$USER/.config/fabric/fabric-bootstrap.inc"; fi
alias gam="/Users/$USER/bin/gamadv-xtd3/gam"
# Set code to launch Visual Studio Code
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# history setup
HISTFILE=$HOME/.zhistory
SAVEHIST=1000
HISTSIZE=999
setopt share_history
setopt hist_expire_dups_first
setopt hist_ignore_dups
setopt hist_verify
# completion using arrow keys (based on history)
bindkey '^[[A' history-search-backward
bindkey '^[[B' history-search-forward
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
eval "$(starship init zsh)"
# Source zsh-syntax-highlighting
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
#ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=white,bold,underline'
# Source zsh-syntax-highlighting
# Command highlighting (valid commands)
ZSH_HIGHLIGHT_STYLES[command]='fg=#A6E22E,bold' # Green for valid commands
# Precommands (e.g., sudo, exec)
ZSH_HIGHLIGHT_STYLES[precommand]='fg=#66D9EF,bold' # Cyan/Blue for precommands
# Options/Arguments
ZSH_HIGHLIGHT_STYLES[arg0]='fg=#F92672,bold' # Pink/Red for command options
ZSH_HIGHLIGHT_STYLES[default]='fg=#FD971F' # Orange for general arguments
# Paths and Directories
ZSH_HIGHLIGHT_STYLES[path]='fg=#66D9EF,underline' # Cyan/Blue with underline for file paths
ZSH_HIGHLIGHT_STYLES[path_prefix]='fg=#66D9EF,bold' # Cyan/Blue for directory paths
# Strings and Variables
ZSH_HIGHLIGHT_STYLES[dquote]='fg=#E6DB74' # Yellow for quoted strings
ZSH_HIGHLIGHT_STYLES[commandseparator]='fg=#AE81FF' # Purple for command separators
# Comments
ZSH_HIGHLIGHT_STYLES[comment]='fg=#75715E' # Gray for comments
# Aliases
ZSH_HIGHLIGHT_STYLES[alias]='fg=#A6E22E,bold' # Green for aliases
# Command Substitutions (e.g., $(command))
ZSH_HIGHLIGHT_STYLES[substitution]='fg=#AE81FF,bold' # Purple with bold for command substitutions
# Incorrect/Unknown Commands
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=#F92672,bold' # Pink/Red for incorrect/unknown commands
Install Nerd Font - FiraMono Nerd Font -- Download the font. Then open spotlight, search for fontbook, copy the font files in to the fonts.
Install Starship - starship.rs
Here's my starship.toml file (updated 08/09/2024)
(> code ~/.config/starship.toml)
format = """
[](#9A348E)\
$os\
$username\
[](bg:#DA627D fg:#9A348E)\
$directory\
[](fg:#DA627D bg:#FCA17D)\
$git_branch\
$git_status\
[](fg:#FCA17D bg:#86BBD8)\
$c\
$elixir\
$elm\
$golang\
$gradle\
$haskell\
$java\
$julia\
$nodejs\
$nim\
$rust\
$scala\
[](fg:#86BBD8 bg:#06969A)\
$docker_context\
[](fg:#06969A bg:#33658A)\
$time\
[ ](fg:#33658A)\
"""
# Disable the blank line at the start of the prompt
# add_newline = false
# You can also replace your username with a neat symbol like or disable this
# and use the os module below
[username]
show_always = true
style_user = "bg:#9A348E"
style_root = "bg:#9A348E"
format = '[$user ]($style)'
disabled = false
# An alternative to the username module which displays a symbol that
# represents the current operating system
[os]
style = "bg:#9A348E"
disabled = true # Disabled by default
[directory]
style = "bg:#DA627D"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
# Here is how you can shorten some long paths by text replacement
# similar to mapped_locations in Oh My Posh:
[directory.substitutions]
"Documents" = " "
"Downloads" = " "
"Music" = " "
"Pictures" = " "
# Keep in mind that the order matters. For example:
# "Important Documents" = " "
# will not be replaced, because "Documents" was already substituted before.
# So either put "Important Documents" before "Documents" or use the substituted version:
# "Important " = " "
[c]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[docker_context]
symbol = " "
style = "bg:#06969A"
format = '[ $symbol $context ]($style)'
[elixir]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[elm]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[git_branch]
symbol = ""
style = "bg:#FCA17D"
format = '[ $symbol $branch ]($style)'
[git_status]
style = "bg:#FCA17D"
format = '[$all_status$ahead_behind ]($style)'
[golang]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[gradle]
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[haskell]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[java]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[julia]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[nodejs]
symbol = ""
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[nim]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[rust]
symbol = ""
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[scala]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[time]
disabled = true
time_format = "%R" # Hour:Minute Format
style = "bg:#33658A"
format = '[ ♥ $time ]($style)'