This is mostly a blog post for me to look back and understand how I’ve setup and configured my dotfiles and other applications that I use.

This is how my shell currently looks like. If you spend considerable amount of time in the shell, it usually is worth to make it look nice.

Watch the recording

OS=Linux SHELL=zsh TERM=xterm-256color


ZSH and Prezto Reference

Before we get into the setup, let’s try to understand the various shell related dotfiles that are in use.

Breakdown of zsh dotfiles

There are five basic starup files which get sourced whenever a new shell is instantiated (excluding prezto config). These are all located in $HOME, i.e ~/.

Prezto’s execution order

According to zsh documentation,

You may wonder why there are both .zprofile and .zlogin, when they are both for login shells: the answer is the obvious one, that one is run before, one after .zshrc. This is historical; Bourne-type shells run /etc/profile, and csh-type shells run ~/.login, and zsh tries to cover the bases with its own startup files.

  1. ~/.zshenv
  2. ~/.zprofile - Prezto source this file for non-login and level 1 shells. ([[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) ]])
  3. ~/.zshrc
  4. ~/.zpreztorc
  5. ~/.zlogin - Only for login shells
  6. ~/.zlogout - Only for login shells

How I manage my dotfiles?

Simple, using git. I have git repository, ~/.dotfiles. All necessary files should be symlinked to $HOME. In the near future, the files will be renamed to filename.symlink, and a new init.sh script will be created which will recursively symlink the files GNU Stow will be used to auto symlink necessary files.

When ~/.zshrc file is sourced, the script in it sources all my *.zsh configuration in the ~/.dofiles/ recursively.

My filesystem

I tweaked XDG base directory specification to suit my needs.

Why? Because symlinking is a tedious process and it’s way more easier to add $HOME/.dotfiles/local/bin to $PATH

Prompt

I use Spaceship prompt. I’ve configured the shell prompt symbol to be random. This sparks joy in me. Have a look at zsh/prompt.zsh for prompt configuration

Vim

I prefer to use vim wherever I can. Currently I use vim in

~/.vimrc is symlinked, and vim plugins are installed through vim-plug in ~/.vim/plugged

Vscode

I can’t remember shorcuts for different applications over the long term. So I prefer to learn one type of shortcuts and use it everywhere. So I learnt IntelliJ’s shortcuts and use the same shortcuts via extension in vscode.

Grub Screen

I customized my grub bootloader to have this background image. Yes, I’m a Messi fan. Grub Background

Inspiration

Holman’s dotfiles.