add readme and some minor config changes
This commit is contained in:
parent
8cfb57f4be
commit
f414fef84b
@ -1,2 +1,3 @@
|
||||
^/\.git.*
|
||||
.*\.bak$
|
||||
readme.md
|
||||
|
||||
73
readme.md
Normal file
73
readme.md
Normal file
@ -0,0 +1,73 @@
|
||||
# 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:
|
||||
|
||||
```sh
|
||||
stowhome <package> [<package> [<package> [...]]]
|
||||
```
|
||||
|
||||
Where `<package>` is a directory from this repo.
|
||||
|
||||
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.
|
||||
|
||||
### 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.
|
||||
@ -9,7 +9,7 @@ alias ls='ls --color=auto'
|
||||
alias la='ls --color=auto -plhA'
|
||||
alias grep='grep --color=auto'
|
||||
|
||||
PS1='\n\h \W\n\$ '
|
||||
PS1='\n\h \w\n\$ '
|
||||
|
||||
export PATH="$PATH:$HOME/.local/bin"
|
||||
export EDITOR=vim
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$*" == "" ]
|
||||
do
|
||||
then
|
||||
echo "you must supply at least one package"
|
||||
echo
|
||||
echo "packages:"
|
||||
cd "$HOME/.config/dotfiles" && find . -maxdepth 1 -type d -not -name ".git" -not -name "." | sed -e 's|^.\/| - |'
|
||||
else
|
||||
stow --dir "$HOME/.config/dotfiles" --target "$HOME" --dotfiles $*
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user