Files
dot/README.md

95 lines
3.1 KiB
Markdown
Raw Normal View History

2026-04-15 12:19:20 -05:00
# dot
## Description
There is no place like $HOME. Home directory setup and bootstrapping guide.
## Table of Contents
2026-04-15 13:01:00 -05:00
* [XDG](#xdg)
2026-04-15 16:33:00 -05:00
* [Full Install](#full-install)
2026-04-15 13:01:00 -05:00
* [Dotfiles](#dotfiles)
2026-04-15 16:33:00 -05:00
* [Bootstrap](#bootstrap)
2026-04-15 12:19:20 -05:00
* [Acknowledgments](#acknowledgments)
* [License](#license)
2026-04-15 13:01:00 -05:00
## XDG
2026-04-15 12:53:15 -05:00
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
2026-04-15 13:01:00 -05:00
before logging in or opening the file manager. I usually truncate the original
names, and add a few more directories.
2026-04-15 15:36:53 -05:00
You can find the original `/etc/xdg/xdg-user-dirs.defaults`[Here](https://myrepos.dev/Randy-Jordan/eg/raw/branch/main/xdg/user-dirs.defaults)
2026-04-15 13:13:39 -05:00
2026-04-15 15:36:53 -05:00
You can find the custom `/etc/xdg/xdg-user-dirs.defaults`[Here](https://myrepos.dev/Randy-Jordan/eg/raw/branch/main/xdg/user-dirs.custom)
2026-04-15 13:01:00 -05:00
2026-04-15 15:36:53 -05:00
Here is an easy script to automate the download and replacement of the defaults.
2026-04-15 13:01:00 -05:00
2026-04-15 16:33:00 -05:00
`curl -fsSL https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/xdg_custom.sh | /bin/bash`
2026-04-15 15:36:53 -05:00
2026-04-15 16:33:00 -05:00
## 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.
2026-04-15 12:19:20 -05:00
2026-04-15 16:33:00 -05:00
`curl -fsSL https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/full_install.sh | /bin/bash`
2026-04-15 12:19:20 -05:00
2026-04-15 16:33:00 -05:00
## 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.
2026-04-15 12:19:20 -05:00
2026-04-15 16:33:00 -05:00
From scratch.
2026-04-15 12:19:20 -05:00
```bash
2026-04-15 16:33:00 -05:00
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.
2026-04-15 12:19:20 -05:00
2026-04-15 16:33:00 -05:00
`curl -fsSL https://myrepos.dev/Randy-Jordan/sh/raw/branch/main/init_dot.sh | /bin/bash`
2026-04-15 12:19:20 -05:00
2026-04-15 16:33:00 -05:00
Here is how you can migrate this setup to another system.
```bash
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
2026-04-15 12:19:20 -05:00
```
2026-04-15 16:33:00 -05:00
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`
2026-04-15 12:19:20 -05:00
## Acknowledgments
[Tom Preston-Werner README Driven Development](https://tom.preston-werner.com/2010/08/23/readme-driven-development)<br>
[Make a README](https://www.makeareadme.com/)<br>
[Choose a LICENSE](https://choosealicense.com/)<br>
[Atlassian - How to store Dotfiles](https://www.atlassian.com/git/tutorials/dotfiles)<br>
## License