Skip to content

felipecrs/dotfiles

Repository files navigation

Felipe Santos' dotfiles

Bootstrap your Ubuntu in a single command!

Sample dotfiles image

This dotfiles repository is currently aimed for Ubuntu on WSL, Ubuntu Server, and Ubuntu Desktop, tested against versions 20.04, 22.04 and 24.04. See how to get started with WSL here.

It's also suitable for use in GitHub Codespaces, Gitpod, VS Code Remote - Containers, or even Linux distributions that are not Ubuntu, through the minimum mode.

Managed with chezmoi, a great dotfiles manager.

Getting started

You can use the convenience script to install the dotfiles on any machine with a single command. Simply run the following command in your terminal:

sh -c "$(wget -qO- https://git.io/felipecrs-dotfiles)"

💡 We use wget here because it comes preinstalled with most Ubuntu versions. But you can also use curl:

 sh -c "$(curl -fsSL https://git.io/felipecrs-dotfiles)"

Demo

dotfiles-installation-demo.mp4

Minimum mode

The installation will ask if you want a minimum mode installation. The minimum mode only installs the needed dotfiles for the command prompt and is compatible with more distributions other than Ubuntu.

It will be enabled by default when running in a Dev Container or in distributions other than Ubuntu. For example, I use it in order to bring my environment to the Home Assistant VS Code Add-on.

Configuring the terminal font

This dotfiles uses the ZSH theme Powerlevel10k, so it requires you to install a font on your host machine with support for the Nerd Fonts glyphs. I recommend the FiraCode Nerd Font Mono.

For WSL and Ubuntu Desktop, the dotfiles installation will automatically take care of installing the font and set it up for you in VS Code, Windows Terminal (for WSL), and GNOME Terminal (for Ubuntu Desktop).

On other systems or terminal emulators, you will need to configure it manually. Here are some tips:

Installing the font on Windows

  1. Download it by clicking here.
  2. Open it and click in Install.
  3. Restart any applications that you want to load the font into.

Configuring the font in VS Code

  1. On VS Code, press Ctrl+, to open the settings.

  2. Search for "Terminal Font Family", and write FiraCode Nerd Font Mono in the entry named Terminal › Integrated: Font Family. Like below:

    VS Code font configuration example

Configuring the font in Windows Terminal

  1. On Windows Terminal, press Ctrl+, to open the settings.

  2. Go to Profiles -> Defaults in the left panel. Then, go to Additional settings -> Appearance.

  3. At Text -> Font face, select FiraCode Nerd Font Mono. Like below:

    Windows Terminal font configuration example


Documentation

If you followed the steps above so far, you already finished installing the dotfiles. Have fun!

The below information is more for reference purposes.

Convenience script

The getting started step used the convenience script to install this dotfiles. There are some extra options that you can use to tweak the installation if you need.

It supports some environment variables:

  • DOTFILES_REPO_HOST: Defaults to https://github.com.
  • DOTFILES_USER: Defaults to felipecrs.
  • DOTFILES_BRANCH: Defaults to master.

For example, you can use it to clone and install the dotfiles repository at the beta branch with:

DOTFILES_BRANCH=beta sh -c "$(wget -qO- https://git.io/felipecrs-dotfiles)"

Installing without the convenience script

If you prefer not to use the convenience script to install the dotfiles, you can also do it manually:

git clone https://github.com/felipecrs/dotfiles "$HOME/.dotfiles"

"$HOME/.dotfiles/install.sh"

Forking guide

If you are forking this repository, don't forget to change the following places:

  • README.md
    • Replace all occurrences of https://git.io/felipecrs-dotfiles with https://raw.githubusercontent.com/<your-username>/dotfiles/HEAD/scripts/install_dotfiles.sh
  • scripts/install_dotfiles.sh
    • Replace all occurrences of felipecrs with <your-username>
  • home/.chezmoi.yaml.tmpl
    • Change the name and email to yours.

Where <your-username> is your GitHub username.


Extra scripts

There are some scripts here to help you automate tricky activities when setting up your machine.

If you already have this dotfiles installed, you can use these scripts right away. Or, if you want to run it without installing the dotfiles, you can do something like:

bash -c "$(curl -fsSL "https://raw.githubusercontent.com/felipecrs/dotfiles/master/scripts/<script-name>")" -- <arguments>

Just replace <script-name> and <arguments> with the desired values. Example:

bash -c "$(curl -fsSL "https://raw.githubusercontent.com/felipecrs/dotfiles/master/scripts/create_alternative_chrome_shortcut.sh")" -- --force
Usage
$ scripts/create_alternative_chrome_shortcut.sh --help
Usage: scripts/create_alternative_chrome_shortcut.sh [-f|--(no-)force] [-h|--help] [<display-name>]
        <display-name>: The name which will be displayed in the app launcher (default: 'Alternative')
        -f, --force, --no-force: Do not ask for confirmation (off by default)
        -h, --help: Prints help

This script creates a new shortcut for Google Chrome which opens using a
different user data directory. This lets you have different icons for different
instances of Google Chrome.
Examples
scripts/create_alternative_chrome_shortcut.sh Personal
Demo

Opening two Chrome instances using different icons