Dotfiles Guide

ยท 195 words ยท 1 minute read

As my first video in 10 years, I wanted to talk about how I setup and use my dotfiles for others to watch and benefit from. This video shows you how you can use a git repository along with stow to setup the perfect enviroment every time you setup a new laptop, desktop, or server.

Video Guide ๐Ÿ”—

Install Stow ๐Ÿ”—

This is how I recommend installing stow on your system:

# Debian / Ubuntu
apt install stow

# Brew (MacOS)
brew install stow

Install Dotfiles Script ๐Ÿ”—

This is an install script to automatically remove and add synlinks using stow.

#!/bin/bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

DOT_FOLDERS="bash,zsh,nvim"

for folder in $(echo $DOT_FOLDERS | sed "s/,/ /g"); do
    echo "[+] Folder :: $folder"
    stow --ignore=README.md --ignore=LICENSE \
        -t $HOME -D $folder
    stow -v -t $HOME $folder
done

# Reload shell once installed
echo "[+] Reloading shell..."
exec $SHELL -l

You can find my install script here on GitHub:

https://github.com/GeekMasher/.dotfiles/blob/main/install.sh

This script is a little more complicated but allows me to role out different “profiles” for different machines

Resources ๐Ÿ”—

  1. Dotfiles
  2. Stow

Images / Banner ๐Ÿ”—

  1. Git Logo
  2. Bash Logo