Skip to content

Commit

Permalink
feat(just): add ujust to reset steam
Browse files Browse the repository at this point in the history
  • Loading branch information
HikariKnight committed Jul 26, 2024
1 parent 95ef8e6 commit 8386bf9
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,30 @@ fix-proton-hang:
for PROG in "${PROTONCORE[@]}"; do
killall -9 "$PROG"
done

# Reset the Steam folder back to a fresh install
fix-reset-steam:
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
STEAMPATH="$HOME/.local/share/Steam"
# Get a list of the contents of steams top level directory except a list of folders/files we can skip to avoid losing data
STEAMFILES=$(ls ~/.local/share/Steam/ | grep -vP "(userdata|compatibilitytools\.d|config|controller_base|steamapps|music)")
echo "This script will ${b}remove${n} a bunch of files from $STEAMPATH and sign you out of steam!"
echo "However your games, music, saves, controller profiles and compatibilitytools/custom-proton will not be touched."
echo "To cancel and abort this operation press CTRL+C now, to continue press ENTER."
read i
killall -9 steam
sleep 1
echo "Resetting Steam to a freshly installed state."
# Loop through each file and process it
for STEAMFILE in $STEAMFILES
do
if [ -d "$STEAMPATH/$STEAMFILE" ]; then
rm -rv "$STEAMPATH/$STEAMFILE"
elif [ -f "$STEAMPATH/$STEAMFILE" ]; then
rm -v "$STEAMPATH/$STEAMFILE"
fi
done
sleep 1
bazzite-steam &
exit 0

0 comments on commit 8386bf9

Please sign in to comment.