Desktop hangs, no action accessible

My machine was running fine and I configured a desktop widget. During that, the machine came to heavy load and I could no longer work with it. I restarted it by ALT-PRINT-R-E-I-S-U-B. It starts, shows the desktop but again, I can’t access any icon or start any application there. I have a console-window open by CTRL-ALT-T and can start applications from there.
How to reset the desktop?

The files in ~/.local ~/.config and ~/.cache is the files defining your desktop experience.

A script for resetting can be found Manjaro-Plasma-Reset/manjaro-plasma-reset.sh at main - wonky/Manjaro-Plasma-Reset - Codeberg.org

For completeness

#!/usr/bin/env bash
#
#  orginal script by https://github.com/nwvh/PlasmaWiper 
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <https://www.gnu.org/licenses/>.#
#
# mogrified for Manjaro by @linux-aarhus
#
# don't run as root
if [[ $(whoami) == "root" ]] ; then
    echo "This script is not for root account"
    exit 1
fi

echo
echo "!----------------------------------------------------------------!"
echo ":: This script will wipe ALL your Plasma settings"
echo ":: You cannot undo without having a backup..."
echo "!----------------------------------------------------------------!"

read -p "Press ENTER to wipe Plasma settings (Ctrl+c to cancel)"

cd ~/
rm -rf .kde 
cd ~/.cache
rm -rf plasmashell* org.kde.dirmodel-qml.kcache kioexec krunner ksycoca5* krunnerbookmarkrunnerfirefoxdbfile.sqlite
cd ~/.local
rm -rf kate/ kded5/ klipper/ knewstuff3/ kscreen/ konsole/ kwalletd/ ksysguard/ kmail2/ kcookiejar/ kactivitymanagerd/
cd ~/.local/share
rm -rf dolphin kate kcookiejar kded5 keyrings klipper kmail2 knewstuff3 konsole kscreen ksysguard kwalletd kxmlgui5 plasma_engine_comic plasma plasma_notes org.kde.gwenview
cd ~/.config
rm -f plasma*
rm -rf kde* akonadi* KDE kconf_updaterc baloo* dolphinrc drkonqirc gwenviewrc kmail2rc k*rc katemetainfos plasma-workspace
echo "Done!"
echo
echo "!----------------------------------------------------------------!"
echo ":: Restore Manjaro Default User Settings"
echo "!----------------------------------------------------------------!"

read -p "Press ENTER to restore Manjaro Default (Ctrl+c to cancel)"

cp /etc/skel/. -r /home/$USER
echo "Done!"
echo

read -p "Press ENTER to restart (Ctrl+c to cancel)"

secs=$((5))
while [ $secs -gt 0 ]; do
   echo -ne "Awaiting restart ... $secs\033[0K\r"
   sleep 1
   : $((secs--))
done

systemctl soft-reboot

Thanks a lot @linux-aarhus, desktop is back with standard Manjaro settings. I have a backup for

before I UPdatet from Plasma5 to Plasma6, should I take these three directories from the backup?

Well, I encounter some hangs (some where I need to power off my laptop with hard button pressed few seconds) but I would to start slowly (not erase all).
Could you give us a kind of level in resetting KDE?

  1. cache
  2. ???
  3. ???

Thanks
(An AI helped me for the script, but I want to know which things have to be remove gradualy)

echo "Choisissez une option de nettoyage:"
echo "1. Effacer uniquement le cache"
echo "2. Effacer le cache et les paramètres locaux"
echo "3. Effacer tous les paramètres Plasma (cache, local, config)"
read -p "Entrez votre choix (1, 2 ou 3) puis appuyez sur ENTRÉE (Ctrl+c pour annuler): " choice

case $choice in

  1)
    echo "Suppression du cache Plasma..."
    cd ~/.cache
    rm -rf plasmashell* org.kde.dirmodel-qml.kcache kioexec krunner ksycoca5* krunnerbookmarkrunnerfirefoxdbfile.sqlite
    ;;

  2) 
    echo "Suppression du cache et des paramètres locaux Plasma..."
    cd ~/.cache
    rm -rf plasmashell* org.kde.dirmodel-qml.kcache kioexec krunner ksycoca5* krunnerbookmarkrunnerfirefoxdbfile.sqlite
    cd ~/.local
    rm -rf kate/ kded5/ klipper/ knewstuff3/ kscreen/ konsole/ kwalletd/ ksysguard/ kmail2/ kcookiejar/ kactivitymanagerd/
    cd ~/.local/share
    rm -rf dolphin kate kcookiejar kded5 keyrings klipper kmail2 knewstuff3 konsole kscreen ksysguard kwalletd kxmlgui5 plasma_engine_comic plasma plasma_notes org.kde.gwenview
    ;;

  3)
    echo "Suppression de tous les paramètres Plasma..."
    cd ~/
    rm -rf .kde
    cd ~/.cache 
    rm -rf plasmashell* org.kde.dirmodel-qml.kcache kioexec krunner ksycoca5* krunnerbookmarkrunnerfirefoxdbfile.sqlite
    cd ~/.local
    rm -rf kate/ kded5/ klipper/ knewstuff3/ kscreen/ konsole/ kwalletd/ ksysguard/ kmail2/ kcookiejar/ kactivitymanagerd/
    cd ~/.local/share
    rm -rf dolphin kate kcookiejar kded5 keyrings klipper kmail2 knewstuff3 konsole kscreen ksysguard kwalletd kxmlgui5 plasma_engine_comic plasma plasma_notes org.kde.gwenview
    cd ~/.config
    rm -f plasma*
    rm -rf kde* akonadi* KDE kconf_updaterc baloo* dolphinrc drkonqirc gwenviewrc kmail2rc k*rc katemetainfos plasma-workspace
    ;;

  *)
    echo "Choix invalide. Aucune action effectuée."
    ;;
esac