Powerlevel10k: The Ultimate Zsh Theme

If you haven’t heard of this gem yet, let me tell you: your life is about to change for the better (or at least your terminal will).

First, what exactly is Powerlevel10k? Well, it’s a zsh theme that goals to provide an aesthetically pleasing and functional interface for your shell. It comes with tons of customization options, including different color schemes, font sizes, and even emojis!

But what sets Powerlevel10k apart from other themes is its ability to display useful information right in the terminal prompt. For example, it can show you your current Git branch, the number of unread messages in your email inbox, or the time and date (just to name a few).

And let’s not forget about the emojis! Powerlevel10k allows you to add cute little smileys and other fun characters to your prompt. Want to see a launching every time you start a new project? No problem! Just customize your theme accordingly, and voila instant motivation boost!

But enough talk, let’s get our hands dirty! Here are the steps to install Powerlevel10k on Ubuntu:

1. Add the following line to your .zshrc file (if you don’t have one yet, create it in your home directory):

# This line sources a script from a URL using the curl command
# The -sL flag ensures that the script is downloaded silently and follows redirects
# The script is then executed and its output is used as input for the source command

source <(curl -sL https://raw.githubusercontent.com/romkatv/powerlevel10k/master/install.sh)

2. Save the file and exit (or open a new terminal window).

3. Run `zsh` to apply the changes:


# This script is used to apply changes made to the zsh shell.
# It should be saved and executed in a terminal window.

# Save the file and exit (or open a new terminal window).
# This command saves the changes made to the zsh shell and exits the terminal.

# Run `zsh` to apply the changes:
# This command runs the zsh shell to apply the changes made in the previous step.




# Save the file and exit (or open a new terminal window).
# This command saves the changes made to the zsh shell and exits the terminal.
$ exit

# Run `zsh` to apply the changes:
# This command runs the zsh shell to apply the changes made in the previous step.
$ zsh

4. Wait for Powerlevel10k to download and install all its dependencies. This may take a few minutes, depending on your internet speed.

5. Once it’s done, you should see something like this:

6. To customize the theme to your liking, open your .zshrc file again and add some of these lines (or create a new one called powerlevel10k.zsh-theme):

# Powerlevel10k configuration
# This script configures the Powerlevel10k theme for the zsh shell.

# Install Powerlevel10k and its dependencies
eval "$(powerlevel10k/install.sh)" # This line is required for oh-my-zsh users

# Set the font to 'nerd' (other options include 'default', 'classic', and 'modern')
POWERLEVEL9K_MODE='nerdfont'

# Increase the number of history items displayed in the prompt
POWERLEVEL9K_HISTORY_SIZE=1000

# Add a newline after the prompt (useful for scripts that print output)
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true

7. Save and exit, then run `zsh` again to apply the changes:


# This script is used to run the zsh shell
# It is important to run this script after making changes to ensure they are applied

# Start by running the zsh shell
$ zsh

# The following code saves and exits the zsh shell
# This allows for changes to be applied
# and for the shell to be restarted with the changes in place
# Note: The command "exit" is used to exit the shell
# and the command "source" is used to apply changes to the current shell
# The "~/.zshrc" file is the configuration file for zsh
# and is where changes are saved and applied
$ exit
$ source ~/.zshrc

# After running the script, the changes should now be applied
# and the zsh shell should be restarted with the changes in place
# This can be confirmed by checking the changes made in the configuration file
# and by running any commands that were affected by the changes
# For example, if a new alias was added, it should now be available for use
# If a new path was added, it should now be included in the $PATH variable
# and any commands in that path should now be accessible
# This process can be repeated as needed to make and apply changes to the zsh shell.

8. Enjoy your newly customized terminal!

SICORPS