Skip to content

Bootstrap your Ubuntu in a few minutes!

License

Notifications You must be signed in to change notification settings

gustavoggsb/dotfiles

 
 

Repository files navigation

Gustavo Baptista's dotfiles

Gitpod ready-to-code

Bootstrap your Ubuntu in a few minutes!

Hello dotfiles! image

This dotfiles repository is currently aimed for Ubuntu on WSL, Ubuntu Server, and Ubuntu Desktop, tested with Ubuntu 20.04. See how to get started with WSL here. It's also suitable for use in GitHub Codespaces and VS Code Remote - Containers.

This repository is managed with chezmoi.

Table of contents


Get started

The current state of this dotfiles uses the zsh theme Powerlevel10k, so it requires you to install a font on your host machine with support for Nerd Fonts. Currently I use FiraCode Nerd Font. You have to:

1. Setup the font

In Ubuntu Desktop, the dotfiles installation will take care of installing the font and set it up in GNOME Terminal. On Windows, you can install it with the following steps:

  1. Download it by clicking here.
  2. Open it and click in Install.

Once you have it installed, you have to configure your terminal applications to use it. To configure VS Code:

💡 You need to restart both VS Code or Windows Terminal after installing the font before using it.

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

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

    VS Code font configuration

To configure Windows Terminal:

  1. On Windows Terminal, press Ctrl+, to open the settings. It will open a json file in your text editor.

  2. Insert a new fontFace key under profiles.defaults with the value FiraCode Nerd Font, something like:

    {
      "profiles": {
        "defaults": {
          // Put settings here that you want to apply to all profiles.
          "fontFace": "FiraCode Nerd Font"
        }
      }
    }

Now you are ready to install the dotfiles.

2. Install the dotfiles

You can use the convenience script to install the dotfiles pretty quickly, and it will install Git in case you don't have it already:

sh -c "$(wget -qO- https://raw.githubusercontent.com/gustavoggsb/dotfiles/master/scripts/install_dotfiles.sh)"

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

 sh -c "$(curl -fsSL https://raw.githubusercontent.com/gustavoggsb/dotfiles/master/scripts/install_dotfiles.sh)"

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


  • DOTFILES_REPO_HOST: Default to https://github.com.
  • DOTFILES_REPO: Default to gustavoggsb.
  • DOTFILES_BRANCH: Default to master.

The previous 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.

The convenience script supports some environment variables:

DOTFILES_BRANCH=beta sh -c "$(wget -qO- https://raw.githubusercontent.com/gustavoggsb/dotfiles/master/scripts/install_dotfiles.sh)"

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

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

Install the dotfiles manually

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

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

Forking guide

If you are forking this repository, you'll have to edit the following areas:

  • README.md
    • Change https://git.io/gustavoggsb-dotfiles to https://raw.githubusercontent.com/<your-username>/dotfiles/master/scripts/install_dotfiles.sh
  • scripts/install_dotfiles.sh
    • Change gustavoggsb to <your-username>
  • .chezmoi.toml.tmpl
    • Change personal and work name and email to yours.

Where <your-username> is your GitHub username or organization name.


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

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

bash -c "$(curl -fsSL "https://raw.githubusercontent.com/gustavoggsb/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/gustavoggsb/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.

Please check the following URL for more information:
  https://github.com/gustavoggsb/dotfiles#create_alternative_chrome_shortcutsh

Examples

scripts/create_alternative_chrome_shortcut.sh Personal

Demo

Opening two Chrome instances using different icons

About

Bootstrap your Ubuntu in a few minutes!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 99.3%
  • PowerShell 0.7%