# Setup

Here is how to install zsh with a custom theme and some basic plugins.

Install zsh with the package manager of your choice  
Install [ohmyzsh](https://github.com/ohmyzsh/ohmyzsh) with

```bash
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

Install the [powerlevel10k](https://github.com/romkatv/powerlevel10k#oh-my-zsh) theme with

```bash
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
```

Set `ZSH_THEME="powerlevel10k/powerlevel10k"` in `~/.zshrc`  
Restart your terminal or use the command

```bash
p10k configure
```

Go through the configuration and customize it to your liking  
In this guide we will install [history-substring-search](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/history-substring-search), [zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting) and [zsh-autocomplete](https://github.com/marlonrichert/zsh-autocomplete)

```bash
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
```

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

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

When all of them are downloaded you will need to activate them, you do that by adding their names to the plugins section in your `~/.zshrc`  
This is how it can look like

```markdown
plugins=(
    git
    history-substring-search
    zsh-syntax-highlighting
    zsh-autosuggestions
)
```

Git was preinstalled when we installed ohmyzsh  
To use the plugins now you will need to type `source ~/.zshrc` or restart your terminal  
Now you have a working install of zsh with plugins and a theme 🚀

For an even better experience I would recommend that you try out the [Meslo nerd font for powerlevel10k](https://github.com/romkatv/powerlevel10k/blob/master/font.md)  
How to install that is highly depended on your distro, but on arch it is available in the [aur](https://aur.archlinux.org/packages/ttf-meslo-nerd-font-powerlevel10k)