diff options
| author | 2026-04-21 01:23:20 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:20 +0100 | |
| commit | cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379 (patch) | |
| tree | dbe36c2a53e7b722973e772d79d052531f8fb5e6 | |
| parent | 7e3e04b8f0a61a8a20928202c102c9dab0d1824a (diff) | |
| download | dotfiles-cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379.tar.gz dotfiles-cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379.tar.bz2 dotfiles-cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379.zip | |
feat: add 'just groups' recipe to show per-group install coverage
Shows install status for each meta group:
✓ (green) fully installed
~ (yellow) partially installed
✗ (red) nothing installed
| -rw-r--r-- | .github/copilot-instructions.md | 2 | ||||
| -rw-r--r-- | justfile | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 30c6c19..e82de1e 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -15,7 +15,7 @@ The repo root is a chezmoi source directory. Files targeting `$HOME` use chezmoi - `create-efi.sh` is an interactive EFI boot entry creation script using `efibootmgr`. - `.chezmoiignore` excludes non-home files (`etc/`, `meta/`, `firefox/`, docs) from deployment to `$HOME`. - `.githooks/` contains git hooks (notably `post-commit` which runs `chezmoi apply`). Activate with `just install-hooks`. -- `justfile` provides recipes: `install-hooks`, `apply`, `install`, `install-all`, `add`, `status`. +- `justfile` provides recipes: `install-hooks`, `apply`, `install`, `install-all`, `add`, `status`, `groups`. ## Window manager @@ -49,3 +49,23 @@ status: echo "" echo "=== Dotfile drift ===" chezmoi status || true + +# Show install coverage for each group +groups: + #!/bin/sh + for file in meta/*.txt; do + group=$(basename "$file" .txt) + pkgs=$(grep -v '^\s*#' "$file" | grep -v '^\s*$') + total=$(echo "$pkgs" | wc -l) + installed=0 + for pkg in $pkgs; do + pacman -Qi "$pkg" >/dev/null 2>&1 && installed=$((installed + 1)) + done + if [ "$installed" -eq "$total" ]; then + printf ' \033[32m✓\033[0m %-10s %d/%d\n' "$group" "$installed" "$total" + elif [ "$installed" -eq 0 ]; then + printf ' \033[31m✗\033[0m %-10s %d/%d\n' "$group" "$installed" "$total" + else + printf ' \033[33m~\033[0m %-10s %d/%d\n' "$group" "$installed" "$total" + fi + done |
