diff options
| author | seraphim <18ycm9tx@anonaddy.me> | 2026-08-23 18:07:29 +0700 |
|---|---|---|
| committer | seraphim <18ycm9tx@anonaddy.me> | 2026-08-23 18:07:29 +0700 |
| commit | ed3e8f6ec6929327ab19e512ffb0d8ece12ed5a8 (patch) | |
| tree | f1a783af87d29b8d78ce20df5a485f92b8c32d5d /install.sh | |
| parent | 3c71645d355910b6998e97a1efca6f5a7c7608bc (diff) | |
reorganize directories, so everything in .config
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -5,11 +5,10 @@ REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" TMP_ERR="$(mktemp)" trap 'rm -f "$TMP_ERR"' EXIT -# Packages whose config lives in a well-formed directory (stowable from repo root) -STOW_PKGS=( - darkman doom fastfetch foot gtk matugen mpv niri nvim rmpc starship - tmux vicinae wallust waybar xdg-desktop-portal yazi zshrc -) +# The .config tree is stowed into $HOME/.config +CONFIG_PKG=".config" +# Remaining home-dotfile packages (stowed into $HOME) +HOME_PKGS=( zshrc ) # Empty portage dirs, recreated because git does not track empty directories PORTAGE_EMPTY_DIRS=( @@ -44,7 +43,19 @@ need_stow() { stow_dotfiles() { cd "$REPO_DIR" local ok=0 fail=0 - for pkg in "${STOW_PKGS[@]}"; do + + # .config package -> ~/.config + if stow -R -v -t "$HOME/.config" "$CONFIG_PKG" >"$TMP_ERR" 2>&1; then + printf ' %s\n' "$(grep '^LINK' "$TMP_ERR" || true)" + ok=$((ok + 1)) + else + warn "stow '$CONFIG_PKG' (-> \$HOME/.config) failed — resolve manually:" + sed 's/^/ /' "$TMP_ERR" || true + fail=$((fail + 1)) + fi + + # remaining home-dotfile packages -> ~ + for pkg in "${HOME_PKGS[@]}"; do if [[ ! -d "$pkg" ]]; then warn "package dir '$pkg' missing — skipped" continue |
