diff --git a/configs/alias_useful.fish b/configs/alias_useful.fish index 72afce4..56d8805 100755 --- a/configs/alias_useful.fish +++ b/configs/alias_useful.fish @@ -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 \ No newline at end of file