added steam_fix

This commit is contained in:
Hannes
2026-07-02 23:34:52 +02:00
parent 7d13a9a5a8
commit 3f7fe4eb1c
+19
View File
@@ -306,4 +306,23 @@ function git_cred
echo "no .git/config file"
echo "could not add the credentials helper"
end
end
################ FIX STEAM ####################################################
function steam_fix
if test -f /usr/share/applications/steam.desktop
# Check if the credential helper is already in the file
if ! grep -q "PrefersNonDefaultGPU=true" -q '/X-KDE-RunOnDiscreteGpu=true' /usr/share/applications/steam.desktop
echo "Steam is allready fixed"
else
echo "Fixing Steam"
# Remove the specific GPU lines using sudo and sed
sudo sed -i -e '/PrefersNonDefaultGPU=true/d' -e '/X-KDE-RunOnDiscreteGpu=true/d' /usr/share/applications/steam.desktop
echo "Steam has been fixed."
end
else
echo "no /usr/share/applications/steam.desktop file"
echo "could not fix steam"
end
end