From 68976bf07c918fc3c3b63eb23b2db63f163c9d63 Mon Sep 17 00:00:00 2001 From: cscs Date: Mon, 24 Mar 2025 04:49:35 +0000 Subject: [PATCH 1/3] Test wallpapers exist before attempting to copy them --- transfuse | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/transfuse b/transfuse index bed2f60..7fd86bf 100755 --- a/transfuse +++ b/transfuse @@ -65,13 +65,17 @@ _tr_copywpf() { if [ -z "$TR_COVER" ]; then mkdir -p ./"$DONOR"_transfusion_"$NOW"/.local/share/wallpapers; OLDFLWR=$(awk -F: '/\[Wallpaper\]\[org\.kde\.image\]/ && $0 != "" { getline; print $1 }' /home/"$DONOR"/.config/plasma-org.kde.plasma.desktop-appletsrc | awk '{ sub(/(Image=){1}/, "") }1 && !/^file$/') - AROSE=$(basename -- "$OLDFLWR") - PETAL="${AROSE##*.}" - if [ "$TR_USECP" = 1 ] || ! command -v rsync >/dev/null 2>&1; - then - cp -drf --preserve=mode,timestamps "$OLDFLWR" ./"$DONOR"_transfusion_"$NOW"/.local/share/wallpapers/flowers."$PETAL"; + if [ -f "$OLDFLWR" ]; then + AROSE=$(basename -- "$OLDFLWR") + PETAL="${AROSE##*.}" + if [ "$TR_USECP" = 1 ] || ! command -v rsync >/dev/null 2>&1; + then + cp -drf --preserve=mode,timestamps "$OLDFLWR" ./"$DONOR"_transfusion_"$NOW"/.local/share/wallpapers/flowers."$PETAL"; + else + _tr_cp "$OLDFLWR" ./"$DONOR"_transfusion_"$NOW"/.local/share/wallpapers/flowers."$PETAL"; + fi else - _tr_cp "$OLDFLWR" ./"$DONOR"_transfusion_"$NOW"/.local/share/wallpapers/flowers."$PETAL"; + echo -e "\n Wallpaper could not be found."; fi else echo -e "\n You are \"Covered\" so the wallpaper selection was not copied."; @@ -232,7 +236,11 @@ _tr_refrkde() { fi; if [ -z "$TR_COVER" ]; then NEWFLWR=$(find /home/"$PATIENT"/.local/share/wallpapers -name "flowers.*"); - plasma-apply-wallpaperimage "$NEWFLWR" ; + if [ -f "$NEWFLWR" ]; then + plasma-apply-wallpaperimage "$NEWFLWR" ; + else + echo -e "\n No wallpaper found."; + fi else echo -e "\n You are \"Covered\" so no change will be made to the wallpaper selection."; fi; -- GitLab From 85b29f451dc1fd7940effb282f58b87a14a656b9 Mon Sep 17 00:00:00 2001 From: cscs Date: Sat, 29 Mar 2025 19:45:20 -0700 Subject: [PATCH 2/3] Edit README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 95e0d86..ee0fbb3 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,13 @@ bash <(curl -s https://gitlab.com/cscs/transfuse/-/raw/main/transfuse) bash <(curl -s https://gitlab.com/cscs/transfuse/-/raw/main/transfuse) -p ``` -

+
+ +### License + +[The Unlicense](/LICENSE) + +
### Donate -- GitLab From 78dbe0b93ae2effa8f79879371b03a786b4c44b1 Mon Sep 17 00:00:00 2001 From: cscs Date: Sat, 29 Mar 2025 21:37:00 -0700 Subject: [PATCH 3/3] Edit README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee0fbb3..1a3584b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Transfuse -A script to backup (copy+compress) and restore your plasma desktop configurations. +A script to backup (copy+compress) and restore KDE Plasma user configurations. Also includes options to export and use package lists for pacman and the Arch User Repository. -- GitLab