From 7f11abf50f7c721f92b5f6bcab50f9ce32801e82 Mon Sep 17 00:00:00 2001 From: thomas Date: Thu, 22 Oct 2026 08:53:36 +0100 Subject: [PATCH] Feature: Pac-Man progress bars, version table and 10 parallel downloads in pacman Turns on ILoveCandy and VerbosePkgLists and raises ParallelDownloads to 10 in system/pacman/options.conf. install.sh now puts the Include at the end of [options] instead of straight after the header, so these override pacman.conf's own defaults (its ParallelDownloads = 5 would otherwise win), and moves an existing Include there when re-run. Co-Authored-By: Claude Opus 5.5 --- system/install.sh | 17 +++++++++++++++-- system/pacman/options.conf | 11 ++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/system/install.sh b/system/install.sh index 7700d53..380b5b5 100755 --- a/system/install.sh +++ b/system/install.sh @@ -6,6 +6,19 @@ repo="$(cd "$(dirname "$0")" && pwd)" # pacman: shared [options] snippet sudo install -m644 "$repo/pacman/options.conf" /etc/pacman.d/options.conf -if ! grep -q '^Include = /etc/pacman.d/options.conf' /etc/pacman.conf; then - sudo sed -i '/^\[options\]/a Include = /etc/pacman.d/options.conf' /etc/pacman.conf +# The Include goes at the end of [options] (just before the first repo section, +# commented or not), so later-wins options like ParallelDownloads override +# pacman.conf's own defaults. Any old copy (e.g. straight after [options]) is +# removed first, so re-running this also moves it into place. +include='Include = /etc/pacman.d/options.conf' +tmp="$(mktemp)" +awk -v inc="$include" ' + $0 == inc { next } + seen && !done && /^#?\[/ { print inc; print ""; done = 1 } + /^\[options\]/ { seen = 1 } + { print } +' /etc/pacman.conf >"$tmp" +if ! cmp -s "$tmp" /etc/pacman.conf; then + sudo install -m644 "$tmp" /etc/pacman.conf fi +rm -f "$tmp" diff --git a/system/pacman/options.conf b/system/pacman/options.conf index 8f806af..9ef7a3a 100644 --- a/system/pacman/options.conf +++ b/system/pacman/options.conf @@ -1,5 +1,10 @@ # Shared pacman [options], included from /etc/pacman.conf. -# Installed to /etc/pacman.d/options.conf by system/install.sh. +# Installed to /etc/pacman.d/options.conf by system/install.sh, which places the +# Include at the *end* of [options] so these override pacman.conf's own defaults +# (e.g. its ParallelDownloads = 5). Color -#ILoveCandy -#VerbosePkgLists +# Pac-Man progress bars instead of [#####] +ILoveCandy +# Table of old/new versions and sizes before "Proceed with installation?" +VerbosePkgLists +ParallelDownloads = 10