From b3ac639b45318efc526c5eada217a29324391d92 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 25 Aug 2026 15:44:07 -0400 Subject: [PATCH] Added optional gamemode support. --- .codex/skills/linux-game-manager-dev/references/core-map.md | 6 ++++-- .install/FreeDoom.sh | 3 ++- .launch/Audio Quake.game | 2 +- .launch/Ball Bouncer.game | 2 +- .launch/Christmas Dash.game | 2 +- .launch/Constant Motion.game | 2 +- .launch/Fantasy Story II.game | 2 +- .launch/FreeDoom.game | 2 +- .launch/Periphery Synthetic EP.game | 2 +- .launch/Play Palace.game | 2 +- .launch/Slay the Spire.game | 2 +- .launch/Soulblaze.game | 2 +- .launch/Stardew Valley.game | 2 +- .launch/Super Liam.game | 2 +- .launch/System Fault.game | 2 +- .launch/The Great Toy Robbery.game | 2 +- .launch/The Omega Reach.game | 2 +- .launch/The Tornado Chicken.game | 2 +- .launch/Top Speed.game | 2 +- .launch/Upheaval Gui.game | 2 +- .launch/Wheels of Prio.game | 2 +- .launch/Wicked Quest.game | 2 +- .launch/Zombowl.game | 2 +- linux-game-manager.sh | 5 +++++ 24 files changed, 32 insertions(+), 24 deletions(-) diff --git a/.codex/skills/linux-game-manager-dev/references/core-map.md b/.codex/skills/linux-game-manager-dev/references/core-map.md index c9fb5f1..75d0c85 100644 --- a/.codex/skills/linux-game-manager-dev/references/core-map.md +++ b/.codex/skills/linux-game-manager-dev/references/core-map.md @@ -1,6 +1,6 @@ # Linux Game Manager Core Map -Last refreshed: 2026-04-14 +Last refreshed: 2026-07-27 ## Top-Level Structure @@ -8,6 +8,7 @@ Last refreshed: 2026-04-14 - `.install/`: Per-game installer scripts sourced by `game_installer`. - `.launch/`: Per-game launch scripts (`.game`) and runnable entries (`.sh`, usually symlinks). - `.update/`: Optional per-game update scripts expected to define `run_update()`. +- `.includes/ipfs.sh`: Central associative array of IPFS download URLs, expanded against the configured gateway at startup. - `speech/speak_window_title.sh`: Accessibility helper for announcing focused window titles. - `README.md`: Project summary and high-level behavior notes. - `.files/`: Game-specific auxiliary assets/scripts used by some installers or launchers. @@ -16,7 +17,7 @@ Last refreshed: 2026-04-14 - Installers: 42 (`.install/*.sh`) - Launcher definitions: 42 (`.launch/*.game`) -- Launcher runnable entries: 31 (`.launch/*.sh`, both symlinks and files) +- Launcher runnable entries: 32 (`.launch/*.sh`, both symlinks and files) - Update scripts: 5 (`.update/*.sh`) Regenerate this snapshot with: @@ -68,6 +69,7 @@ python3 .codex/skills/linux-game-manager-dev/scripts/audit_game_catalog.py - Config base: `${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/linux-game-manager` - Settings overrides: `settings.conf` in config base - Default install root: `${HOME}/.local/games` +- IPFS gateway: `${ipfsGateway:-https://ipfs.stormux.org}`; `.includes/ipfs.sh` is sourced after settings so centralized URLs honor the override. ## Contributor Pitfalls diff --git a/.install/FreeDoom.sh b/.install/FreeDoom.sh index ad91d70..c3c02e3 100644 --- a/.install/FreeDoom.sh +++ b/.install/FreeDoom.sh @@ -1,3 +1,4 @@ +# shellcheck shell=bash disable=SC2154 # Variables are set by linux-game-manager.sh tobyVersion="9.0" mkdir -p "${installPath}/doom" doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null)" @@ -19,7 +20,7 @@ fi doomPath="$(find /usr/share -type d -name "doom" 2> /dev/null | head -1)" # The url breaks the normal download function download_named "keyshare-universal.pk3" "https://forum.zdoom.org/download/file.php?id=42262" -download "${ipfsGateway}/ipfs/QmU6REFot8CGVSBy2YWQxnmXoh7M4EF74RxFtLzvtJxoGC?filename=toby_doom_${tobyVersion}_full.zip" +download "${ipfs[FreeDoom]}" unzip -n -d "${installPath}/doom" "${cache}/toby_doom_${tobyVersion}_full.zip" # Move contents from nested folder up one directory (including hidden files) shopt -s dotglob diff --git a/.launch/Audio Quake.game b/.launch/Audio Quake.game index 67948d5..0b33cd1 100644 --- a/.launch/Audio Quake.game +++ b/.launch/Audio Quake.game @@ -64,4 +64,4 @@ configure_audio configure_webkit set_sound_device pushd "${installPath}/AudioQuake" -./AudioQuake +run_with_optional_gamemode ./AudioQuake diff --git a/.launch/Ball Bouncer.game b/.launch/Ball Bouncer.game index 9f819d4..12ecc5a 100644 --- a/.launch/Ball Bouncer.game +++ b/.launch/Ball Bouncer.game @@ -1,3 +1,3 @@ check_architecture x86_64 pushd "${installPath}/BallBouncer" -${fex}./BallBouncer +run_with_optional_gamemode ${fex}./BallBouncer diff --git a/.launch/Christmas Dash.game b/.launch/Christmas Dash.game index 989439b..cb358ba 100644 --- a/.launch/Christmas Dash.game +++ b/.launch/Christmas Dash.game @@ -11,4 +11,4 @@ fi pushd "${gameDir}" SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \ REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt \ -"${gameExecutable}" +run_with_optional_gamemode "${gameExecutable}" diff --git a/.launch/Constant Motion.game b/.launch/Constant Motion.game index 78acdae..f13c19c 100644 --- a/.launch/Constant Motion.game +++ b/.launch/Constant Motion.game @@ -1,4 +1,4 @@ check_architecture x86_64 gameExecutable="${installPath}/Constant Motion/cm" pushd "${installPath}/Constant Motion" -${fex}"${gameExecutable}" +run_with_optional_gamemode ${fex}"${gameExecutable}" diff --git a/.launch/Fantasy Story II.game b/.launch/Fantasy Story II.game index 8dacf35..7cbcece 100644 --- a/.launch/Fantasy Story II.game +++ b/.launch/Fantasy Story II.game @@ -1,2 +1,2 @@ pushd "${installPath}" -"${installPath}/FS2_3.0_Linux/fs2.x86_64" "-ESpeakApplication=espeak-ng" +run_with_optional_gamemode "${installPath}/FS2_3.0_Linux/fs2.x86_64" "-ESpeakApplication=espeak-ng" diff --git a/.launch/FreeDoom.game b/.launch/FreeDoom.game index 4324353..64ca164 100755 --- a/.launch/FreeDoom.game +++ b/.launch/FreeDoom.game @@ -8,4 +8,4 @@ if ! [[ -d "toby-doom-launcher" ]]; then else git -C "${gamePath}/toby-doom-launcher" pull fi -"toby-doom-launcher/Toby Doom Launcher.py" +run_with_optional_gamemode "toby-doom-launcher/Toby Doom Launcher.py" diff --git a/.launch/Periphery Synthetic EP.game b/.launch/Periphery Synthetic EP.game index 0e30257..7c4192b 100644 --- a/.launch/Periphery Synthetic EP.game +++ b/.launch/Periphery Synthetic EP.game @@ -1,2 +1,2 @@ pushd "${installPath}" -"${installPath}/periphery-synthetic-ep/periphery-synthetic-ep" +run_with_optional_gamemode "${installPath}/periphery-synthetic-ep/periphery-synthetic-ep" diff --git a/.launch/Play Palace.game b/.launch/Play Palace.game index 43bcee9..96056e3 100644 --- a/.launch/Play Palace.game +++ b/.launch/Play Palace.game @@ -15,4 +15,4 @@ if [[ -d "${hostPythonDir}" ]]; then fi pushd "${desktopPath}" || exit 1 -uv run python client.py +run_with_optional_gamemode uv run python client.py diff --git a/.launch/Slay the Spire.game b/.launch/Slay the Spire.game index a914399..0b3e6f0 100755 --- a/.launch/Slay the Spire.game +++ b/.launch/Slay the Spire.game @@ -27,7 +27,7 @@ else fi pushd "${HOME}/.local/games/SlayTheSpire" -./MTS.sh --profile "$currentProfile" +run_with_optional_gamemode ./MTS.sh --profile "$currentProfile" popd exit 0 diff --git a/.launch/Soulblaze.game b/.launch/Soulblaze.game index d43f4ac..1406dde 100644 --- a/.launch/Soulblaze.game +++ b/.launch/Soulblaze.game @@ -1,2 +1,2 @@ pushd "${installPath}" -"${installPath}/Soulblaze/Soulblaze.x86_64" +run_with_optional_gamemode "${installPath}/Soulblaze/Soulblaze.x86_64" diff --git a/.launch/Stardew Valley.game b/.launch/Stardew Valley.game index d812165..dc78a8a 100644 --- a/.launch/Stardew Valley.game +++ b/.launch/Stardew Valley.game @@ -1,2 +1,2 @@ pushd "${installPath}" -"${installPath}/StardewValley/StardewValley" +run_with_optional_gamemode "${installPath}/StardewValley/StardewValley" diff --git a/.launch/Super Liam.game b/.launch/Super Liam.game index 8a1923c..2148417 100644 --- a/.launch/Super Liam.game +++ b/.launch/Super Liam.game @@ -1,4 +1,4 @@ check_architecture x86_64 gamePath="${installPath}/Super Liam" pushd "${gamePath}" -${fex}./SuperLiam +run_with_optional_gamemode ${fex}./SuperLiam diff --git a/.launch/System Fault.game b/.launch/System Fault.game index a1d745a..960335a 100644 --- a/.launch/System Fault.game +++ b/.launch/System Fault.game @@ -1,2 +1,2 @@ pushd "${installPath}" -"${installPath}/System_Fault/system-fault-linux-x86_64.AppImage" +run_with_optional_gamemode "${installPath}/System_Fault/system-fault-linux-x86_64.AppImage" diff --git a/.launch/The Great Toy Robbery.game b/.launch/The Great Toy Robbery.game index 37fa955..41de75d 100644 --- a/.launch/The Great Toy Robbery.game +++ b/.launch/The Great Toy Robbery.game @@ -1,4 +1,4 @@ check_architecture x86_64 gamePath="${installPath}/The Great Toy Robbery" pushd "${gamePath}" -${fex}./tgtr +run_with_optional_gamemode ${fex}./tgtr diff --git a/.launch/The Omega Reach.game b/.launch/The Omega Reach.game index fbe2037..fdf78b0 100644 --- a/.launch/The Omega Reach.game +++ b/.launch/The Omega Reach.game @@ -1,4 +1,4 @@ # shellcheck shell=bash disable=SC2154 # installPath is set by linux-game-manager.sh gamePath="${installPath}/Omega Reach" pushd "${gamePath}" || return 1 -"${gamePath}/the-omega-reach" +run_with_optional_gamemode "${gamePath}/the-omega-reach" diff --git a/.launch/The Tornado Chicken.game b/.launch/The Tornado Chicken.game index 7acbb5b..ea68d35 100644 --- a/.launch/The Tornado Chicken.game +++ b/.launch/The Tornado Chicken.game @@ -1,3 +1,3 @@ check_architecture x86_64 pushd "${installPath}/The Tornado Chicken" -${fex}./Ttc +run_with_optional_gamemode ${fex}./Ttc diff --git a/.launch/Top Speed.game b/.launch/Top Speed.game index 0164d09..04b418c 100644 --- a/.launch/Top Speed.game +++ b/.launch/Top Speed.game @@ -11,4 +11,4 @@ if [[ ! -x "$gameExecutable" ]]; then return 1 fi pushd "${gameDir}" || return 1 -"${gameExecutable}" +run_with_optional_gamemode "${gameExecutable}" diff --git a/.launch/Upheaval Gui.game b/.launch/Upheaval Gui.game index 39f030b..79bfce0 100644 --- a/.launch/Upheaval Gui.game +++ b/.launch/Upheaval Gui.game @@ -1,2 +1,2 @@ pushd "${installPath}" -"${installPath}/Upheaval_Gui/Upheaval" +run_with_optional_gamemode "${installPath}/Upheaval_Gui/Upheaval" diff --git a/.launch/Wheels of Prio.game b/.launch/Wheels of Prio.game index b7b9e58..0f531f8 100644 --- a/.launch/Wheels of Prio.game +++ b/.launch/Wheels of Prio.game @@ -1,3 +1,3 @@ check_architecture x86_64 pushd "${installPath}/Wheels of Prio" -${fex}./Wp +run_with_optional_gamemode ${fex}./Wp diff --git a/.launch/Wicked Quest.game b/.launch/Wicked Quest.game index a146c1e..0e203a9 100644 --- a/.launch/Wicked Quest.game +++ b/.launch/Wicked Quest.game @@ -4,4 +4,4 @@ if [[ "$arch" == "aarch64" ]]; then else pushd "${installPath}/wicked_quest-linux-x86_64" fi -./wicked_quest +run_with_optional_gamemode ./wicked_quest diff --git a/.launch/Zombowl.game b/.launch/Zombowl.game index fc7de8a..6b37dac 100644 --- a/.launch/Zombowl.game +++ b/.launch/Zombowl.game @@ -1,2 +1,2 @@ pushd "${installPath}" -"${installPath}/${pkgname%.*}/Zombowl" +run_with_optional_gamemode "${installPath}/${pkgname%.*}/Zombowl" diff --git a/linux-game-manager.sh b/linux-game-manager.sh index cfc4d55..1b99300 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -950,6 +950,11 @@ unset noCache export doomLanguage="${doomLanguage:-en}" export installPath="${HOME}/.local/games" export ipfsGateway="${ipfsGateway:-https://ipfs.stormux.org}" +# shellcheck source=.includes/ipfs.sh +# shellcheck disable=SC1091 # Source path is resolved from the runtime script location +source "${scriptRoot}/.includes/ipfs.sh" +# shellcheck source=.includes/gamemode.sh +source "${scriptRoot}/.includes/gamemode.sh" export spd_module="${spd_module:+ -o ${spd_module}}" export spd_pitch="${spd_pitch:+ -p ${spd_pitch}}" export spd_rate="${spd_rate:+ -r ${spd_rate}}"