80 lines
2.1 KiB
Markdown
80 lines
2.1 KiB
Markdown
# Stew Home
|
|
|
|
This repo contains dotfiles LailaTheElf uses in the home directory. It also
|
|
contains a script (`stow/dot-local/bin/stowhome`) that uses GNU Stow to link
|
|
them from all the correct spots.
|
|
|
|
## Install
|
|
|
|
> NOTE: this is made for [ElfOS](https://gitea.finnvanreenen.nl/LailaTheElf/ElfOS.git)
|
|
> any other setup are **not** suported!
|
|
|
|
1. Install GNU Stow:
|
|
|
|
```sh
|
|
sudo pacman -Sy stow
|
|
```
|
|
|
|
2. Clone this repository to `~/.config/dotfiles`.
|
|
|
|
```sh
|
|
git clone https://gitea.finnvanreenen.nl/LailaTheElf/stowhome.git -O "$HOME/.config/dotfiles"
|
|
```
|
|
|
|
3. Install stowhome
|
|
|
|
```sh
|
|
"$HOME/.config/dotfiles/stow/dot-local/bin/stowhome" stow
|
|
```
|
|
|
|
## File structure
|
|
|
|
Of the repo, the root directory contains a folder for every package and the
|
|
following files:
|
|
|
|
- **.stow-local-ignore**: The ignore file for GNU Stow (uses [Perl regex](https://perldoc.perl.org/perlre)).
|
|
- **readme.md**: This file.
|
|
|
|
The packages is essentially a chroot of the home directory. All the files in
|
|
there are links to the corresponding place of the home directory (except the
|
|
once matching a line in the `.stow-local-ignore` file).
|
|
|
|
The `--dotfile` option is used; this means files and directories starting with
|
|
'dot-' will be prepended with a dot. So `dot-local` will become `.local`. This
|
|
is to prevent a repository full of hidden files.
|
|
|
|
## Usage
|
|
|
|
### Link the dotfiles (stewing)
|
|
|
|
```sh
|
|
stowhome <package> [<package> [<package> [...]]]
|
|
```
|
|
|
|
Where `<package>` is a directory from this repo or `all` foor all packages.
|
|
|
|
If the dotfiles already exist as normal files (not symlinks), it will skip this
|
|
file. To overwrite the file in stow, use this command:
|
|
|
|
```sh
|
|
stowhome --adopt <package> [<package> [<package> [...]]]
|
|
```
|
|
|
|
To overwrite the dotfile, you can just remove or rename the file and then run
|
|
`stowhome` again.
|
|
|
|
### Unlink the dotfiles (destewing)
|
|
|
|
```sh
|
|
stowhome -D <package> [<package> [<package> [...]]]
|
|
```
|
|
|
|
### Update dotfiles
|
|
|
|
To edit an already managed by stowhome dotfile, you can just edit it. The
|
|
changes will update in the Git repository (`$HOME/.config/dotfiles`), but no
|
|
commit will be made.
|
|
|
|
Overriding a file with one in this repo is easies by removing or renaming the
|
|
file.
|