diff options
| -rwxr-xr-x | archsetup | 13 | ||||
| -rw-r--r-- | dotfiles/hyprland/.config/hypr/hyprland.conf | 2 | ||||
| -rwxr-xr-x | scripts/package-inventory | 222 | ||||
| -rw-r--r-- | todo.org | 3 |
4 files changed, 237 insertions, 3 deletions
@@ -1424,6 +1424,8 @@ hyprland() { pacman_install sushi # nautilus spacebar file preview aur_install nautilus-open-any-terminal # right-click "open in terminal" with configurable terminal pacman_install file-roller # archive manager (integrates with nautilus) + pacman_install hyprpaper # wallpaper utility with IPC controls + pacman_install wev # wayland event debugger (xev equivalent) # Hyprland Plugins (via hyprpm) # Plugins are installed on first login via hyprland-plugins-setup script @@ -1506,6 +1508,7 @@ desktop_environment() { pacman_install ttf-hack-nerd pacman_install ttf-jetbrains-mono-nerd pacman_install ttf-meslo-nerd + pacman_install ttf-dejavu # fallback font family pacman_install ttf-nerd-fonts-symbols-mono aur_install ttf-all-the-icons aur_install ttf-lato @@ -1526,6 +1529,7 @@ desktop_environment() { pacman_install testdisk pacman_install tickrs pacman_install udisks2 + pacman_install flatpak # app sandboxing and distribution aur_install touchpad-indicator-git aur_install dotpac aur_install downgrade @@ -1602,6 +1606,7 @@ desktop_environment() { for software in bluez bluez-utils blueman; do pacman_install "$software" done + pacman_install solaar # Logitech device manager action="enabling bluetooth to launch at boot" && display "task" "$action" systemctl enable bluetooth.service >> "$logfile" 2>&1 || error_warn "$action" "$?" @@ -1609,7 +1614,8 @@ desktop_environment() { action="Command Line Utilities" && display "subtitle" "$action" for software in htop btop mc ncdu tmux fzf zip unzip atool wget detox \ - lsof usbutils dfu-util moreutils nvtop s-tui wavemon bandwhich; do + lsof usbutils dfu-util moreutils nvtop s-tui wavemon bandwhich \ + sshpass socat; do pacman_install "$software" done @@ -1780,7 +1786,8 @@ developer_workstation() { pacman_install sdcv # stardict dictionary system pacman_install languagetool # grammar/style checker for flycheck pacman_install deno # JS runtime for yt-dlp YouTube extraction - pipx_install yt-dlp # video download (pipx keeps it current) + pip_install yt-dlp # video download (pipx keeps it current) + pacman_install atomicparsley # MPEG-4 metadata (used by yt-dlp for embedding thumbnails) action="setting up emacs configuration files" && display "task" "$action" emacs_dir="/home/$username/.emacs.d" @@ -1934,6 +1941,8 @@ supplemental_software() { action="prep to workaround tidal-dl issue" && display "task" "$action" yay -S --noconfirm --mflags --skipinteg python-lyricsgenius >> "$logfile" 2>&1 || error_warn "$action" "$?" aur_install tidal-dl # tidal-dl:tidal as yt-dlp:youtube + aur_install tidal-dl-ng # next-gen tidal downloader + aur_install freetube # privacy-focused YouTube desktop client } ### Boot-UX diff --git a/dotfiles/hyprland/.config/hypr/hyprland.conf b/dotfiles/hyprland/.config/hypr/hyprland.conf index 4f7096e..1c4e17c 100644 --- a/dotfiles/hyprland/.config/hypr/hyprland.conf +++ b/dotfiles/hyprland/.config/hypr/hyprland.conf @@ -106,7 +106,7 @@ cursor { input { kb_layout = us kb_options = ctrl:nocaps - follow_mouse = 2 + follow_mouse = 0 float_switch_override_focus = 0 mouse_refocus = false touchpad { diff --git a/scripts/package-inventory b/scripts/package-inventory new file mode 100755 index 0000000..4742645 --- /dev/null +++ b/scripts/package-inventory @@ -0,0 +1,222 @@ +#!/bin/bash +# package-inventory - Compare archsetup packages vs live system +# Shows: packages in archsetup but missing from system, +# packages on system but not in archsetup +# +# Usage: package-inventory [--archsetup-only | --system-only | --summary] + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +ARCHSETUP="$SCRIPT_DIR/archsetup" + +# Colors +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +CYAN='\033[0;36m' +BOLD='\033[1m' +NC='\033[0m' + +# ============================================================================ +# Extract packages from archsetup script +# ============================================================================ +extract_archsetup_packages() { + local tmp + tmp=$(mktemp) + + # Extract pacman_install and aur_install calls (single package per line) + grep -E '^\s*(pacman_install|aur_install)\s+' "$ARCHSETUP" \ + | grep -v '^\s*#' \ + | sed -E 's/^\s*(pacman_install|aur_install)\s+//' \ + | sed -E 's/\s*#.*//' \ + | sed 's/"//g' \ + | grep -v '^\$' \ + >> "$tmp" + + # Extract packages from for-loops: "for software in pkg1 pkg2 pkg3 ...; do" + # These span multiple lines with backslash continuations + awk ' + /for software in/ { capture=1; sub(/.*for software in/, ""); } + capture { + cont = ($0 ~ /\\$/) + gsub(/\\/, ""); + gsub(/;.*/, ""); + gsub(/do$/, ""); + # Print each word as a package + for (i=1; i<=NF; i++) { + pkg = $i + # Skip shell syntax + if (pkg ~ /^\$|^#|^for|^in|^do|^done/) continue + gsub(/"/, "", pkg) + if (pkg != "") print pkg + } + if (!cont) capture=0 + } + ' "$ARCHSETUP" >> "$tmp" + + # Extract pipx packages (these won't be in pacman -Qqe, note them separately) + # Skip for now — pipx packages aren't pacman-managed + + sort -u "$tmp" + rm -f "$tmp" +} + +# ============================================================================ +# Get packages on live system +# ============================================================================ +get_system_packages_explicit() { + pacman -Qqe | sort -u # explicitly installed +} + +get_system_packages_all() { + pacman -Qq | sort -u # all installed (including deps) +} + +# ============================================================================ +# Categorize system packages +# ============================================================================ +get_system_native() { + pacman -Qqen | sort -u # native (official repos) +} + +get_system_foreign() { + pacman -Qqem | sort -u # foreign (AUR/manual) +} + +# ============================================================================ +# Main comparison +# ============================================================================ +main() { + local mode="${1:-}" + + local archsetup_pkgs system_explicit system_all + archsetup_pkgs=$(extract_archsetup_packages) + system_explicit=$(get_system_packages_explicit) + system_all=$(get_system_packages_all) + + # "not installed" = not on system at all (filters out dep-installed packages) + # "not in archsetup" = explicitly installed but not declared in archsetup + local missing_from_system missing_from_archsetup in_both + missing_from_system=$(comm -23 <(echo "$archsetup_pkgs") <(echo "$system_all")) + missing_from_archsetup=$(comm -13 <(echo "$archsetup_pkgs") <(echo "$system_explicit")) + in_both=$(comm -12 <(echo "$archsetup_pkgs") <(echo "$system_explicit")) + + local archsetup_count system_count both_count missing_sys_count missing_arch_count + archsetup_count=$(echo "$archsetup_pkgs" | wc -l) + system_count=$(echo "$system_explicit" | wc -l) + both_count=$(echo "$in_both" | grep -c . || true) + missing_sys_count=$(echo "$missing_from_system" | grep -c . || true) + missing_arch_count=$(echo "$missing_from_archsetup" | grep -c . || true) + + case "$mode" in + --archsetup-only) + echo "$missing_from_system" + ;; + --system-only) + echo "$missing_from_archsetup" + ;; + --summary) + print_summary "$archsetup_count" "$system_count" "$both_count" \ + "$missing_sys_count" "$missing_arch_count" + ;; + --help|-h) + echo "Usage: package-inventory [OPTION]" + echo "" + echo "Compare packages in archsetup script vs installed on this system." + echo "" + echo "Options:" + echo " (none) Full report with all sections" + echo " --archsetup-only Packages in archsetup but not on system (plain list)" + echo " --system-only Packages on system but not in archsetup (plain list)" + echo " --summary Summary counts only" + echo " --help This help message" + ;; + "") + print_full_report "$archsetup_pkgs" "$system_explicit" \ + "$missing_from_system" "$missing_from_archsetup" "$in_both" \ + "$archsetup_count" "$system_count" "$both_count" \ + "$missing_sys_count" "$missing_arch_count" + ;; + *) + echo "Unknown option: $mode" >&2 + echo "Run with --help for usage." >&2 + exit 1 + ;; + esac +} + +# ============================================================================ +# Output formatting +# ============================================================================ +print_summary() { + local archsetup_count="$1" system_count="$2" both_count="$3" + local missing_sys_count="$4" missing_arch_count="$5" + + echo -e "${BOLD}Package Inventory Summary${NC}" + echo "─────────────────────────────────────" + echo -e " Archsetup declares: ${CYAN}${archsetup_count}${NC} packages" + echo -e " System has installed: ${CYAN}${system_count}${NC} packages (explicit)" + echo -e " In common: ${GREEN}${both_count}${NC}" + echo -e " In archsetup, not system: ${YELLOW}${missing_sys_count}${NC}" + echo -e " On system, not archsetup: ${YELLOW}${missing_arch_count}${NC}" +} + +print_full_report() { + local archsetup_pkgs="$1" system_pkgs="$2" + local missing_from_system="$3" missing_from_archsetup="$4" in_both="$5" + local archsetup_count="$6" system_count="$7" both_count="$8" + local missing_sys_count="$9" missing_arch_count="${10}" + + echo "" + print_summary "$archsetup_count" "$system_count" "$both_count" \ + "$missing_sys_count" "$missing_arch_count" + + if [[ -n "$missing_from_system" ]]; then + echo "" + echo -e "${BOLD}${YELLOW}In archsetup but NOT installed on this system (${missing_sys_count}):${NC}" + echo -e "${YELLOW}These may need installing, or are for a different desktop/hardware.${NC}" + echo "─────────────────────────────────────" + echo "$missing_from_system" | while read -r pkg; do + echo " $pkg" + done + fi + + if [[ -n "$missing_from_archsetup" ]]; then + echo "" + echo -e "${BOLD}${YELLOW}On system but NOT in archsetup (${missing_arch_count}):${NC}" + echo -e "${YELLOW}Add to archsetup, or remove from system if no longer needed.${NC}" + echo "─────────────────────────────────────" + + # Split into native and foreign for easier review + local native foreign + native=$(get_system_native) + foreign=$(get_system_foreign) + + local foreign_extras native_extras + foreign_extras=$(comm -12 <(echo "$missing_from_archsetup") <(echo "$foreign")) + native_extras=$(comm -12 <(echo "$missing_from_archsetup") <(echo "$native")) + + local foreign_count native_count + foreign_count=$(echo "$foreign_extras" | grep -c . || true) + native_count=$(echo "$native_extras" | grep -c . || true) + + if [[ -n "$foreign_extras" ]]; then + echo -e " ${CYAN}AUR/foreign (${foreign_count}):${NC}" + echo "$foreign_extras" | while read -r pkg; do + echo " $pkg" + done + fi + + if [[ -n "$native_extras" ]]; then + echo -e " ${CYAN}Official repos (${native_count}):${NC}" + echo "$native_extras" | while read -r pkg; do + echo " $pkg" + done + fi + fi + + echo "" +} + +main "$@" @@ -776,6 +776,9 @@ accessible via stowed symlinks pointing to repo. *** TODO [#A] Build CI/CD pipeline that runs archsetup on every commit Core automation infrastructure - enables continuous validation +**** TODO [#B] Investigate rlwrap not installed after archsetup run +rlwrap is declared in archsetup (Emacs Dependencies section, line 1779) but was not installed on this machine after archsetup ran. Manually installed 2026-02-06. When CI/CD is running, verify that all packages in the Emacs Dependencies section are actually installed after a full test run. May indicate a broader issue with packages being skipped silently. + *** TODO [#A] Generate recovery scripts from test failures Auto-create post-install fix scripts for failed packages - makes failures actionable |
