From cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:23:20 +0100 Subject: feat: add 'just groups' recipe to show per-group install coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shows install status for each meta group: ✓ (green) fully installed ~ (yellow) partially installed ✗ (red) nothing installed --- justfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'justfile') diff --git a/justfile b/justfile index fe1cc65..fe58d8d 100644 --- a/justfile +++ b/justfile @@ -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 -- cgit v1.2.3-70-g09d2