How to Set Up Your Terminal for Maximum Productivity in Development
Tags: terminal, bash, shell, tools
Published: 2024-05-22 09:52:15

The internet is flooded with articles on configuring a **terminal for productive work**, and this guide is another drop in that ocean. It’s designed to be useful for complete beginners or for those looking to try something different.

Following the steps in this guide, you will end up with a terminal that looks similar to the screenshot below.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dl2ilc90fqplnr3nych3.png)


Let’s start from defining the software we will use:

1. The [Alacrity](https://alacritty.org/) terminal is incredibly fast and customizable. Try working with a large project in Vim using, for example, iTerm. You might be pleasantly surprised.
2. [Fish](https://fishshell.com/) shell
3. Plugins for fish:
  - [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish) — packet manager for the fish shell
  - [bobthefish](https://github.com/oh-my-fish/theme-bobthefish) — nice powerline style theme
  - [git](https://github.com/jhillyerd/plugin-git) — provides a efficient shortcuts for git
  - [bass](https://github.com/edc/bass) — allows to use bash script/utilities in fish

**How to install and setup**
1. Install the Alacritty terminal emulator using your machine’s packet manager or by following the instructions provided in the manual installation guide.

```bash
brew install --cask alacritty # for macOS
# or 
sudo snap install alacritty --classic # for unix based os
```
2. To configure Alacritty, we need to create a configuration file.
```bash
touch $HOME/.config/alacritty/alacritty.toml
# or
touch $HOME/.alacritty.toml
```
and put an initial configs into it
```bash
import = [
  "~/.config/alacritty/catppuccin-mocha.toml" # use a nice looking theme
]

[font]
normal = {family= "JetBrains Mono"} # Good programming font from JetBrain
size = 12.0

[window]
#decorations = "None"
dynamic_padding = true
dimensions = { columns = 160, lines = 45 } # dimensions of the terminal window

[env]
TERM = "xterm-256color"

[selection]
save_to_clipboard = true # save selected text to the clipboard

```
3. Install a **Fish shell** using available package manager or one of some different options from [here](https://medium.com/b68bbda4d0a04669937edd670cba8e1a?pvs=25)
```bash
brew install fish # for macOS
# or use following commands for Debian system
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt update
sudo apt install fish
```
4. Set Fish as a default shell

```bash
echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish
```
5. Restart your terminal and install oh-my-fish package manager

```bash
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish

```
After that, you will be able to manage your Fish plugins using the following commands:

```bash
omf list # List all installed plugins
omf install [plugin name] # Install plugin
omf update [plugin-name]  # Update plugin
omf remove [plugin-name]  # Remove plugin  
```
6. Let’s install some **plugins** mentioned in the beginning, you can use full repository url with plugin to install iLet’s install some plugins mentioned in the beginning. You can use the full repository URL with the plugin to install it.
```bash
omf install https://github.com/jhillyerd/plugin-git
omf install bobthefish
omf install bass
```
7. To get everything out from the bobthefish theme, we need to install a [powerline](https://powerline.readthedocs.io/en/master/overview.html) font.
```bash
sudo port select python python27-apple
brew install python

pip install --user powerline-status
```
8. Download and install JetBrains Mono font, following [this](https://www.jetbrains.com/lp/mono/#how-to-install) instructions.
9. Download a catppuccin-mocha theme. You can find more theme options in the [GitHub repo](https://github.com/catppuccin/alacritty).
```bash
curl -LO --output-dir ~/.config/alacritty https://github.com/catppuccin/alacritty/raw/main/catppuccin-mocha.toml

```
---
At this point, you should have the fast and beautiful modern terminal in use. There are millions of different Fish plugins and Alacritty settings that you can set up to customize the terminal for your particular needs. This is just an initial setup, which can be infinitely modified.