Beautify your terminal in Linux
September 27, 2024
Prerequisites
-
You need the Kitty terminal (optional actually), you can check the Kitty docs for how to install it in your device here.
-
Check your shell by writing this command in your terminal:
or
Download and install Nerd fonts
Download and install Nerd Fonts in your terminal. Here's how you install fonts in Kitty:
- Unzip the file.
- Move your
.ttf
files to~/.local/share/fonts
(create this directory if it doesn’t exist). - Type
fc-cache -f -v
to refresh the font cache. - Open Kitty's configuration file: or use VSCode if you prefer:
- Add the following line to set the fonts (for example, if you're using MesloLGS NF)
Install Starship Prompt
After setting up the fonts and terminal, the next step is to install the Starship prompt.
-
Install Starship by running the following command:
-
Add the following line to your shell configuration file depending on the shell you use:
- For Bash, add this to
~/.bashrc
:
- For Zsh, add this to
~/.zshrc
:
- For Bash, add this to
-
Restart your terminal or source the configuration file:
Customize Starship Configuration
Starship’s configuration is stored in a file located at ~/.config/starship.toml
. Here's how you can create and modify it:
-
Create the configuration file:
-
Open the file in an editor like Nano or VSCode:
or
-
Add some basic configurations. For example:
Test Your Terminal
Now that everything is set up, open a new terminal window and check the new prompt, fonts, and symbols.
If you want to further tweak the appearance, explore more advanced Starship configurations in the official Starship documentation.
also if you are lazy to tweak by yourself there is a preset that starship already create here
The Config im using
First you need to install the catpuccin-mocha theme for kitty here
then type this command starship preset gruvbox-rainbow -o ~/.config/starship.toml
and last copy this config and paste it to your starship.toml
to apply it