Skip to content

Instantly share code, notes, and snippets.

@delgod
Forked from kevin-smets/iterm2-solarized.md
Last active November 15, 2020 14:59
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 delgod/356a09e11292828becfc65596f3f3d74 to your computer and use it in GitHub Desktop.
Save delgod/356a09e11292828becfc65596f3f3d74 to your computer and use it in GitHub Desktop.
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

How to install

iTerm2

brew cask install iterm2

Or, if you do not have homebrew (you should ;)): Download and install iTerm2

iTerm2 has better color fidelity than the built in Terminal, so your themes will look better.

Get the iTerm color settings

Just save it somewhere and open the file(s). The color settings will be imported into iTerm2. Apply them in iTerm through iTerm → preferences → profiles → colors → load presets. You can create a different profile other than Default if you wish to do so.

Oh My Zsh

More info here: https://github.com/robbyrussell/oh-my-zsh

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

When the installation is done, edit ~/.zshrc and set ZSH_THEME="agnoster"

Powerlevel9k / Powerlevel10k

Why Powerlevel10k? Well, because it's a drop-in replacement for Powerlevel9k, just a lot faster to render your prompt. ls feels fast again!

So if you prefer the Powerlevel10k look with added info such as exit codes and timestamps on the right, run:

git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

Then edit your ~/.zshrc and set ZSH_THEME="powerlevel10k/powerlevel10k".

Also add the following: POWERLEVEL9K_MODE="awesome-patched"

Powerlevel10k offers a whole lot more, best is to check its project page.

Install a patched font

Open the downloaded font and press "Install Font".

Set this font in iTerm2 (iTerm → Preferences → Profiles → Text → Change Font), best to do this for "Font" and for "Non-ASCII Font".

Restart iTerm2 for all changes to take effect.

Further tweaking

Things like

  • auto suggestions
  • word jumping with arrow keys / natural text editing
  • shorter prompt style
  • syntax highlighting
  • visual studio code config

can be found in the section below.

Auto suggestions (for Oh My Zsh)

Auto suggestions

Just follow these steps: https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh

If the auto suggestions do not appear to show, it could be a problem with your color scheme. Under "iTerm → Preferences → Profiles → Colors tab", check the value of Black Bright, that is the color your auto suggestions will have. It will be displayed on top of the Background color. If there is not enough contrast between the two, you won't see the suggestions even if they're actually there..

Enable word jumps and word deletion, aka natural text selection

By default, word jumps (option + → or ←) and word deletions (option + backspace) do not work. To enable these, go to "iTerm → Preferences → Profiles → Keys → Load Preset... → Natural Text Editing → Boom! Head explodes"

Syntax highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

links

ln -s ~/go/src/bitbucket.org/delgod/home-dir/.gitconfig
ln -s ~/go/src/bitbucket.org/delgod/home-dir/.p10k.zsh
ln -s ~/go/src/bitbucket.org/delgod/home-dir/.zshrc
ln -s ~/go/src/bitbucket.org/delgod/home-dir/.vimrc
ln -s /Volumes/Keybase/private/delgod/home/.aws
ln -s /Volumes/Keybase/private/delgod/home/.ssh
ln -s /Volumes/Keybase/private/delgod/home/bin

install vim-dir

tar -zxpf /Volumes/Keybase/private/delgod/home/vim.tgz

install color schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment