2026-04-15 16:33:00 -05:00
2026-04-15 12:35:49 -05:00
2026-04-15 12:35:49 -05:00
2026-04-15 12:35:49 -05:00
2026-04-15 12:35:49 -05:00
2026-04-15 16:33:00 -05:00

dot

Description

There is no place like $HOME. Home directory setup and bootstrapping guide.

Table of Contents

XDG

xdg-user-dirs is a tool to help manage "well known" user directories like the desktop folder and the music folder. It also handles localization (i.e. translation) of the filenames.

xdg-user-dirs-update is ran early in the login phase. It reads a configuration file /etc/xdg/xdg-user-dirs.defaults. You should replace this file as root before logging in or opening the file manager. I usually truncate the original names, and add a few more directories.

You can find the original /etc/xdg/xdg-user-dirs.defaultsHere

You can find the custom /etc/xdg/xdg-user-dirs.defaultsHere

Here is an easy script to automate the download and replacement of the defaults.

curl -fsSL https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/xdg_custom.sh | /bin/bash

Full Install

Once you've got your home directories setup, you may want to download all needed packages from apt. Here is a script to automate a full install.

curl -fsSL https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/full_install.sh | /bin/bash

Dotfiles

Now that we've got all the needed packages. Lets take care of our dotfiles. I will be following the guide in the acknowledgments.

From scratch.

git init --bare $HOME/.dot
alias config='/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME'" >> $HOME/.bashrc

Now add all of your dotfiles. Here is a snippet to make things easier.

curl -fsSL https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/init_dot.sh | /bin/bash

Here is how you can migrate this setup to another system.

git clone --bare https://myrepos.dev/Randy-Jordan/dot.git $HOME/.dot
function config {
   /usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
    echo "Checked out config.";
    else
        echo "Backing up pre-existing dot files.";
        config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
fi;
config checkout
config config status.showUntrackedFiles no

And here is that in a snippet as well. curl -fsSL https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/init_dl.sh | /bin/bash

Bootstrap

Here is a script to automate all of this.

curl -fsSL https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/bootstrap.sh | /bin/bash

Acknowledgments

Tom Preston-Werner README Driven Development
Make a README
Choose a LICENSE
Atlassian - How to store Dotfiles

License

Description
There is no place like $HOME. Home directory setup and bootstrapping guide.
Readme 43 KiB