From 30d6008bc28c98976d1676eb5e2b640f4e43b02a Mon Sep 17 00:00:00 2001 From: Gabe Date: Thu, 22 Oct 2026 01:20:49 +0000 Subject: [PATCH] Update Ricing/backup-rice.sh --- Ricing/backup-rice.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Ricing/backup-rice.sh b/Ricing/backup-rice.sh index c2a4380..be4a01a 100644 --- a/Ricing/backup-rice.sh +++ b/Ricing/backup-rice.sh @@ -36,11 +36,12 @@ rel_home () { } # dump (skipped if dconf is missing or the path is empty) +# The home directory is replaced with __HOME__ so the file works for any username. dump () { if command -v dconf >/dev/null 2>&1; then data=$(dconf dump "$1" 2>/dev/null || true) if [ -n "$data" ]; then - printf '%s\n' "$data" > "$OUT/$2.dconf" + printf '%s\n' "$data" | sed "s#$HOME#__HOME__#g" > "$OUT/$2.dconf" echo " settings: $1 -> $2.dconf" fi fi @@ -81,8 +82,9 @@ if command -v hydrapaper >/dev/null 2>&1 || [ -d "$HOME/.config/hydrapaper" ]; t add .var/app/org.gabmus.hydrapaper # Find the source images it merges: any image path in its settings or config files. + # (The dconf file holds __HOME__ now, so swap the real path back in for this scan.) CANDIDATES=$( { - [ -f "$OUT/hydrapaper.dconf" ] && cat "$OUT/hydrapaper.dconf" + [ -f "$OUT/hydrapaper.dconf" ] && sed "s#__HOME__#$HOME#g" "$OUT/hydrapaper.dconf" find "$HOME/.config/hydrapaper" "$HOME/.local/share/hydrapaper" -type f -exec cat {} + 2>/dev/null } | grep -aoE "(file://)?/[^'\",]+\.(png|jpe?g|webp|bmp)" || true )