added steam_fix
This commit is contained in:
@@ -307,3 +307,22 @@ function git_cred
|
|||||||
echo "could not add the credentials helper"
|
echo "could not add the credentials helper"
|
||||||
end
|
end
|
||||||
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
|
||||||
Reference in New Issue
Block a user