Browse by section

Web Design & Dev 日本語

Set Up the Mac Terminal with Iceberg and Prezto pure

To tidy up the look of the macOS terminal and its prompt, I use Iceberg for the colours and Prezto with the pure theme for the prompt.

The short answer: Iceberg is a colour scheme, Prezto is a configuration framework for zsh, and pure is one of its prompt themes. They are three separate things, not one product called “Prezto(pure)”.

The point to know first: Iceberg is fundamentally a Vim and Neovim colour scheme, and the preset for the macOS Terminal app is distributed separately from the official site. Cloning the GitHub repository alone will not change your terminal colours.

▼ Environment used to check this

macOS 26 (Apple Silicon) / zsh / Terminal.app

Sponsored

What are Iceberg, Prezto and pure?

The short answer: three separate pieces of software with different jobs.

Name Type What it handles
Iceberg Colour scheme Text and background colours. Built for Vim and Neovim, with a Terminal.app preset also distributed
Prezto zsh configuration framework Completion, aliases, prompt and other settings as a bundle
pure Prompt theme What the prompt displays. Ships with Prezto

Iceberg is published by cocopon at cocopon/iceberg.vim. Prezto is published by sorin-ionescu at sorin-ionescu/prezto.

How do you apply Iceberg to Terminal.app?

The short answer: download the .terminal file from the Iceberg site and import it as a profile.

The download link is on the official Iceberg site. It is not inside the GitHub repository, which is why cloning the repo changes nothing.

  1. Download the Terminal.app file from the Iceberg site
  2. Double-click it, which loads the profile
  3. Open Terminal, then Settings and Profiles
  4. Select Iceberg in the list and press Default

If double-clicking does not import it, use the gear menu at the bottom left of Settings and Profiles and choose Import.

You can confirm the default profile actually switched.

$ defaults read com.apple.Terminal "Default Window Settings"
Iceberg

Iceberg means new windows will use it. If you forgot to press Default, this returns Basic even though Iceberg appears in the profile list.

iTerm2 and other terminals

The short answer: a .terminal file cannot be loaded by iTerm2.

iTerm2 uses its own .itermcolors format. The Iceberg site lists the 16 ANSI colour values, so you either enter them by hand or find a file in the matching format.

Sponsored

How do you install Prezto?

The short answer: clone the repository to ~/.zprezto and symlink the bundled config files into your home directory.

git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

--recursive also fetches the submodules. Leave it out and themes such as pure will be missing.

Then link the configuration files.

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

Run this in zsh. setopt and ^README.md(.N) are zsh-specific syntax and will error in bash. zsh has been the default since macOS Catalina, so it normally just works.

It fails if .zshrc already exists

The short answer: an existing ~/.zshrc or ~/.zpreztorc produces ln: File exists and no links are created.

Move the existing files aside and run it again.

mv ~/.zshrc ~/.zshrc.backup

If your Homebrew PATH setup lives in ~/.zshrc, moving it aside will break the brew command. Put that line back after Prezto is installed. The setup is covered in installing Homebrew and Vim on a Mac.

How do you switch the prompt to pure?

The short answer: put zstyle ':prezto:module:prompt' theme 'pure' in ~/.zpreztorc and open a new terminal.

zstyle ':prezto:module:prompt' theme 'pure'

~/.zpreztorc already contains a line reading theme 'sorin'. Editing that line is the most reliable approach.

Open a new window or tab afterwards; the current one will not pick it up.

To check whether the edit landed, read the file directly.

$ grep theme ~/.zpreztorc
zstyle ':prezto:module:prompt' theme 'pure'

If theme 'pure' comes back, the setting is in place. While theme 'sorin' is still there, reopening the terminal will not give you pure. ~/.zpreztorc runs to a couple of hundred lines, so grep beats scrolling.

Looking at the other themes first

The short answer: prompt -l lists the available themes and prompt -p pure previews one.

prompt -l
prompt -p pure

pure is a sparse theme showing the Git branch, whether there are changes, and how long the last command took. If you want more information on screen, powerlevel10k is an alternative, but it needs a patched font (Nerd Fonts) installed separately.

Using Iceberg in Vim as well

The short answer: copy colors/iceberg.vim from the repository into ~/.vim/colors/ and add colorscheme iceberg to ~/.vimrc.

git clone https://github.com/cocopon/iceberg.vim.git
mkdir -p ~/.vim/colors
cp iceberg.vim/colors/iceberg.vim ~/.vim/colors/
colorscheme iceberg

The terminal and Vim are configured separately. Setting both to Iceberg keeps the colours consistent whether Vim is open or not.

For cutting down keyboard-to-trackpad trips outside the terminal too, Alfred, the free Mac launcher covers the same ground for the rest of the desktop.