Setting up ZSH in Fedora, Linux Mint and other ubuntu-like distributions

Everyone wants to make their workplace a little better and more convenient than it comes from the “Box”. In this manual, you can quickly and painlessly configure the ZSH Shell terminal to better display information and, if necessary, expand its functionality with plugins. Along the way, we’ll install one of the Kitty terminals, which allows you to use tabs and “windows” in your work. Using it you can structure your workplace easily and quickly. The advantage of this instruction is that you will receive fresh and stable versions of NeoVim and some packages, because installation and assembly will be carried out directly from the repositories.

First, let’s update all the packages, please note that there will be different lines for different distributions. (Ubuntu and Ubuntu are similar distributions such as Linux Mint, etc. we will write Ubuntu for brevity):

Ubuntu: sudo apt update

Fedora: sudo dnf update

Let’s install Git to download packages. (if you have it installed, you can skip this step):

Ubuntu: sudo apt install git

Fedora: sudo dnf install git

Next, install the Kitty terminal, install it from the repositories of the systems themselves. Information about the terminal itself and hotkeys can be read here (https://sw.kovidgoyal.net/kitty/):

Ubuntu: sudo apt install kitty

Fedora: sudo dnf install kitty

It’s time to install Shell ZSH itself

Ubuntu: sudo apt install zsh

Fedora: sudo dnf install zsh

Just in case, let’s create a configuration file if it was not created during installation:

touch ~/.zshrc

Let’s assign zsh as the default command shell (shell) in our system, depending on your settings in the system, you may need to enter a password to change the shell:

chsh -s $(which zsh)

To be able to install additional plugins and “upgrade” ZSH, we will install the OhMyZsh framework for it; information about it can be read here (https://ohmyz.sh/)

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

For further installation, so as not to litter our directories, we will create a tmp folder in the root of the profile

cd ~/ && mkdir tmp && cd tmp

Download scripts from my repository, in it you can find working settings for various applications used in work, such as (i3 – tile manager, polybar, helix – code editor, wezterm – multiplex terminal, picom – beauty for a window manager, nvim – code editor , kitty – multiplex terminal), we are specifically interested in the installation script for the necessary fonts:

git clone https://github.com/apilot/dotfiles.git

cd ~/tmp/dotfiles

We select the fonts we want to install. the main fonts have already been selected. If necessary, you can remove the comment before the font name in the list or comment out those that are not needed. in any case, later you can then delete unnecessary things from the folder itself ~/.local/share/fonts :

Let’s make the script executable:

chmod +x ./fonts_install.sh

run it:

./font_install.sh

Next, we’ll install a theme with a manager to fine-tune it:

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

The file needs to be edited ~/.zshrcreplace the ZSH_THEME key value with:
ZSH_THEME="powerlevel10k/powerlevel10k"

launch the editor:

nano ~/.zshrc

press to save Ctrl + X and press Enter

close the terminal

press ALT-F2 and type the command

kitty

Then we follow the instructions for setting up our Powerlevel10k theme, everything is quite simple and transparent. For your convenience, I took step-by-step pictures of the window:

we are asked if we see a diamond between the arrows

we are asked if we see a diamond between the arrows

Is the lock visible between the arrows?

Is the lock visible between the arrows?

they ask if we see an up arrow, at this step I got it wrong, there is no arrow, so I clicked no

they ask if we see an up arrow, at this step I got it wrong, there is no arrow, so I clicked no

in the next step the arrow appears, continue setting

in the next step the arrow appears, continue setting

asks which number the green down arrow points to

asks which number the green down arrow points to

they are interested in whether the icons are displayed normally along with the text, whether they run over the X crosses

they are interested in whether the icons are displayed normally along with the text, whether they run over the X crosses

we choose what will be more pleasant for us to look at

we choose what will be more pleasant for us to look at

Since Russian characters are expected to be used, select UNICODE

Since Russian characters are expected to be used, select UNICODE

select the degree of darkness of our information line

select the degree of darkness of our information line

select whether and in what format time is needed in the terminal status line

select whether and in what format time is needed in the terminal status line

how we want to divide the information on the left side of the panel

how we want to divide the information on the left side of the panel

what type will it be "head" left side of the terminal

what type of “head” will be on the left side of the terminal?

what type will it be? "tail" left side

what type will the “tail” of the left side have?

select to show the status line in one or two lines.  I can only recommend 2 lines for use.  because  information about the branch in git will eat up a lot of space and on "body" There won't be much command line left.  and so it will be possible to write commands in the full width.

select to show the status line in one or two lines. I can only recommend 2 lines for use. because information about the branch in git will eat up a lot of space and there will not be much left for the “body” of the command line. and so it will be possible to write commands in the full width.

do we want to visually connect the left and right parts of the information part of the terminal and in what way

do we want to visually connect the left and right parts of the information part of the terminal and in what way

do we need connecting lines for two lines of the same space, command line and infobar

do we need connecting lines for two lines of the same space, command line and infobar

also for everyone, compact version or with division into a line

also for everyone, compact version or with division into a line

option to display icons in the status bar

option to display icons in the status bar

here as you like

here as you like

interesting option with the option not to overload the sequence of commands

interesting option with the option not to overload the sequence of commands

confirm with the first recommended point

confirm with the first recommended point

save the settings in our zsh configuration file

save the settings in our zsh configuration file

As a result, we get a terminal like this, with easy-to-read information about the state and path of the directory in which we are working.

As a result, we get a terminal like this, with easy-to-read information about the state and path of the directory in which we are working.

All the best!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *