-
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Ujust scripts for Cloud apps (Xbox Cloud Gaming, others?) (#2223)
* feat: add ujust file to make non steam games for webapps * fix: swap chrome for FF, better default compatibility * feat: add xbox cloud, tweak script * chore: clean up script * feat: first pass of ugum picker menu * feat: remove PWA firefox method, integrate Aru's Appimage with args method * feat: add options in exec, for maybe add to yafti? * add media app installers to yafti for baz portal * fix: rm plex and crunchyrole as webapps are meh * chore: add desc, fix just syntax * fix: better description, syntax
- Loading branch information
1 parent
69466c5
commit 3b53e6f
Showing
3 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
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
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
96 changes: 96 additions & 0 deletions
96
system_files/desktop/shared/usr/share/ublue-os/just/88-bazzite-webapps.just
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# vim: set ft=make : | ||
|
||
# Add various streaming services as Electron web apps to Steam | ||
get-webapp service="": | ||
#!/usr/bin/bash | ||
# Load ugum for interactive menu | ||
source /usr/lib/ujust/ujust.sh | ||
# Function to install StreamingServiceLauncher | ||
install_launcher() { | ||
echo "Installing StreamingServiceLauncher..." | ||
# Create necessary directories | ||
mkdir -p "$HOME/.local/bin" | ||
mkdir -p "$HOME/Applications" | ||
# Clean up any old versions | ||
rm -f "$HOME/.local/bin/StreamingServiceLauncher.AppImage" | ||
rm -f "$HOME/Applications/StreamingServiceLauncher.AppImage" | ||
rm -f "$HOME/.local/bin/streaming-service-launcher" | ||
# Download latest release | ||
RELEASE_URL="https://api.github.com/repos/aarron-lee/StreamingServiceLauncher/releases/latest" | ||
wget -q $(curl -s $RELEASE_URL | jq -r ".assets[] | select(.name | test(\".*AppImage\")) | .browser_download_url") \ | ||
-O "$HOME/Applications/StreamingServiceLauncher.AppImage" | ||
# Create launcher script | ||
echo "#!/bin/bash" > "$HOME/.local/bin/streaming-service-launcher" | ||
echo "\"$HOME/Applications/StreamingServiceLauncher.AppImage\" --appname=\$1 --no-sandbox" >> "$HOME/.local/bin/streaming-service-launcher" | ||
# Make executables | ||
chmod +x "$HOME/Applications/StreamingServiceLauncher.AppImage" | ||
chmod +x "$HOME/.local/bin/streaming-service-launcher" | ||
if [ ! -f "$HOME/Applications/StreamingServiceLauncher.AppImage" ]; then | ||
echo "Installation failed" | ||
exit 1 | ||
fi | ||
echo "Installation completed successfully" | ||
} | ||
# Check for StreamingServiceLauncher and install if needed | ||
[ ! -f "$HOME/Applications/StreamingServiceLauncher.AppImage" ] && install_launcher | ||
# Create scripts directory | ||
mkdir -p "$HOME/Applications/streaming_scripts" | ||
# Display menu | ||
if [ -n "{{ service }}" ]; then | ||
CHOICE="{{ service }}" | ||
else | ||
echo -e "\n${bold}Select a streaming service to add to Steam:${normal}" | ||
CHOICE=$(ugum choose \ | ||
"YouTube" \ | ||
"Netflix" \ | ||
"Amazon Luna" \ | ||
"Disney Plus" \ | ||
"Amazon Prime Video" \ | ||
"Apple TV" \ | ||
"Curiosity Stream" \ | ||
"GeForce Now" \ | ||
"HBO Max" \ | ||
"Hulu" \ | ||
"Paramount Plus" \ | ||
"Peacock" \ | ||
"Sling TV" \ | ||
"Spotify" \ | ||
"Vimeo" \ | ||
"Xbox Cloud Gaming" \ | ||
"YouTube Music" \ | ||
"YouTube TV" \ | ||
"Exit") | ||
fi | ||
# Exit early if user chose to exit | ||
[ "$CHOICE" = "Exit" ] && { echo "Exiting..."; exit 0; } | ||
# Create webapp script and add to Steam | ||
create_script() { | ||
local script_path="$HOME/Applications/streaming_scripts/$1.sh" | ||
echo "#!/bin/bash" > "$script_path" | ||
echo "\"$HOME/.local/bin/streaming-service-launcher\" \"$2\"" >> "$script_path" | ||
chmod +x "$script_path" | ||
steamos-add-to-steam "$script_path" | ||
echo "Added $1 to Steam successfully!" | ||
} | ||
# Process user choice | ||
case "$CHOICE" in | ||
"YouTube") create_script "youtube" "youtube" ;; | ||
"Netflix") create_script "netflix" "netflix" ;; | ||
"Amazon Luna") create_script "amazon-luna" "amazonLuna" ;; | ||
"Disney Plus") create_script "disney-plus" "disneyPlus" ;; | ||
"Amazon Prime Video") create_script "prime-video" "amazonPrimeVideo" ;; | ||
"Apple TV") create_script "apple-tv" "appleTv" ;; | ||
"Curiosity Stream") create_script "curiosity-stream" "curiosityStream" ;; | ||
"GeForce Now") create_script "geforce-now" "geForceNow" ;; | ||
"HBO Max") create_script "hbo-max" "hboMax" ;; | ||
"Hulu") create_script "hulu" "hulu" ;; | ||
"Paramount Plus") create_script "paramount-plus" "paramountPlus" ;; | ||
"Peacock") create_script "peacock" "peacock" ;; | ||
"Sling TV") create_script "sling-tv" "slingTV" ;; | ||
"Spotify") create_script "spotify" "spotify" ;; | ||
"Vimeo") create_script "vimeo" "vimeo" ;; | ||
"Xbox Cloud Gaming") create_script "xbox-cloud" "xboxGamePassStreaming" ;; | ||
"YouTube Music") create_script "youtube-music" "youtubeMusic" ;; | ||
"YouTube TV") create_script "youtube-tv" "youTubeTV" ;; | ||
*) echo "Invalid choice" ; exit 1 ;; | ||
esac |