aurora136d805
stow: target ~ via .stowrc so the repo can live anywhere
Fixes #2
+10 −6
7 files changed
- M .config/qt5ct/qt5ct.conf +1 −1
- M .config/qt6ct/qt6ct.conf +1 −1
- M .config/shell/aliasrc +1 −1
- M .stow-local-ignore +1 −0
- A .stowrc +2 −0
- M README.md +2 −1
- M install.sh +2 −2
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | # Colours: matugen writes ~/.cache/matugen/qt-colors.conf on every wallpaper change. | |
| 2 | − | # Edit this file in ~/aurora: saving from the qt5ct GUI replaces the stow symlink. | |
| 2 | + | # Edit this file in the aurora repo: saving from the qt5ct GUI replaces the stow symlink. | |
| 3 | 3 | [Appearance] | |
| 4 | 4 | color_scheme_path=/home/k/.cache/matugen/qt-colors.conf | |
| 5 | 5 | custom_palette=true | |
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | # Colours: matugen writes ~/.cache/matugen/qt-colors.conf on every wallpaper change. | |
| 2 | − | # Edit this file in ~/aurora: saving from the qt6ct GUI replaces the stow symlink. | |
| 2 | + | # Edit this file in the aurora repo: saving from the qt6ct GUI replaces the stow symlink. | |
| 3 | 3 | [Appearance] | |
| 4 | 4 | color_scheme_path=/home/k/.cache/matugen/qt-colors.conf | |
| 5 | 5 | custom_palette=true | |
| @@ -26,7 +26,7 @@ alias \ | |||
| 26 | 26 | ||
| 27 | 27 | alias on="tmux new-session -s notes -c ~/dox/brain 'nvim .'" | |
| 28 | 28 | alias todo="nvim ~/dox/brain/Todo.md" | |
| 29 | − | alias dots="cd ~/aurora/" | |
| 29 | + | alias dots='cd "$(dirname "$(readlink -f ~/.config/shell/aliasrc)")/../.."' # wherever the repo lives | |
| 30 | 30 | alias cava="cava -p ~/.cache/matugen/cava" # colours from matugen | |
| 31 | 31 | ||
| 32 | 32 | # Colorize commands when possible. | |
| @@ -7,3 +7,4 @@ install.sh | |||
| 7 | 7 | LICENSE | |
| 8 | 8 | CLAUDE\.md | |
| 9 | 9 | glyph-rice | |
| 10 | + | \.stowrc | |
| @@ -0,0 +1,2 @@ | |||
| 1 | + | --target=~ | |
| 2 | + | --no-folding | |
| @@ -65,7 +65,8 @@ cd ~/aurora | |||
| 65 | 65 | ./install.sh --yes # pre-select the default packages, no pickers | |
| 66 | 66 | ./install.sh --check # only compare installed packages with the lists, changes nothing | |
| 67 | 67 | ``` | |
| 68 | − | Clone it straight into your home directory (`~/aurora`): stow links into the parent directory. | |
| 68 | + | Clone it anywhere (e.g. `~/dev/aurora`): the repo's `.stowrc` points stow at `$HOME`. Re-stow by hand with `stow .` | |
| 69 | + | from the repo; to move an existing checkout, `stow -D .` first, move it, then `stow .` again. | |
| 69 | 70 | ||
| 70 | 71 | ## Packages | |
| 71 | 72 | The lists live in `packages/*.txt`: one package per line, `#` for comments, and a trailing `!` means | |
| @@ -279,7 +279,7 @@ Proceed with system configuration (stow, shell)?"; then | |||
| 279 | 279 | ## Stow dotfiles ## | |
| 280 | 280 | ################### | |
| 281 | 281 | log INFO "Detecting conflicts..." | |
| 282 | − | mapfile -t conflicts < <(stow . --no-folding -nv 2>&1 | \ | |
| 282 | + | mapfile -t conflicts < <(stow -t "$HOME" . --no-folding -nv 2>&1 | \ | |
| 283 | 283 | sed -n 's/.*existing target \(.*\) since neither.*/\1/p') | |
| 284 | 284 | ||
| 285 | 285 | if ((${#conflicts[@]} == 0)); then | |
| @@ -302,7 +302,7 @@ Proceed with system configuration (stow, shell)?"; then | |||
| 302 | 302 | log INFO "Backups are in $BACKUP_DIR" | |
| 303 | 303 | fi | |
| 304 | 304 | ||
| 305 | − | stow . --no-folding \ | |
| 305 | + | stow -t "$HOME" . --no-folding \ | |
| 306 | 306 | && log SUCCESS "Dotfiles stowed successfully" \ | |
| 307 | 307 | || log ERROR "Stow failed" | |
| 308 | 308 | ||