Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ivanaugustobds/de28aee61ff5ccd668cd756d8437cc41 to your computer and use it in GitHub Desktop.
Save ivanaugustobds/de28aee61ff5ccd668cd756d8437cc41 to your computer and use it in GitHub Desktop.
Flatpak Steam tweaks
#!/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