Created
December 24, 2022 22:10
-
-
Save ivanaugustobds/de28aee61ff5ccd668cd756d8437cc41 to your computer and use it in GitHub Desktop.
Flatpak Steam tweaks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FLATPAK_STEAM_PATH=~/.var/app/com.valvesoftware.Steam | |
[ ! -d "$FLATPAK_STEAM_PATH" ] && echo 'Flatpak Steam not found' && exit 1 | |
# Copy the icon files | |
USER_ICONS_PATH=~/.local/share/icons | |
mkdir -p "$USER_ICONS_PATH" | |
rsync -a "$FLATPAK_STEAM_PATH"/data/icons/* "$USER_ICONS_PATH" | |
# Copy the desktop entries from flatpak to user apps directory | |
USER_APPS_PATH=~/.local/share/applications | |
mkdir -p "$USER_APPS_PATH" | |
for DESKTOP_ENTRY in "$FLATPAK_STEAM_PATH"/Desktop/*; do | |
cp "$DESKTOP_ENTRY" "$USER_APPS_PATH" | |
done | |
# Replace the executable with the flatpak steam one | |
for DESKTOP_ENTRY in "$USER_APPS_PATH"/*; do | |
sed -i 's/Exec=steam/Exec=flatpak run com.valvesoftware.Steam/' "$DESKTOP_ENTRY" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment