From f01aa93d0e878290579adff9c69bc4401751f52b Mon Sep 17 00:00:00 2001 From: Rick Peters Date: Thu, 24 Sep 2026 11:46:25 +0200 Subject: [PATCH] feat: Wizard shortcut on the desktop and in the launcher - Menu item: desktop icon + launcher entry that run the newest release in Konsole. - Icon: Valve's return icon with a gear (assets/steam-gaming-settings.svg), published with each release. - Desktop files are written already executable, so Plasma runs them. - VERSION 0.9.0. --- .github/workflows/bundle.yml | 4 +- AGENTS.md | 7 + CHANGELOG.md | 15 ++- README.md | 8 +- assets/steam-gaming-settings.svg | 224 +++++++++++++++++++++++++++++++ lib/menu.sh | 3 +- lib/wizard-shortcut.sh | 80 +++++++++++ setup-gamescope-boot.sh | 4 +- 8 files changed, 336 insertions(+), 9 deletions(-) create mode 100644 assets/steam-gaming-settings.svg create mode 100644 lib/wizard-shortcut.sh diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index 1fc7a7b..ffcadb1 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -72,7 +72,7 @@ jobs: ## Changes in v$VERSION $changes" - gh release create "v$VERSION" dist/setup-gamescope-boot.sh \ + gh release create "v$VERSION" dist/setup-gamescope-boot.sh assets/steam-gaming-settings.svg \ --target "$GITHUB_SHA" --title "v$VERSION" --notes "$notes" --latest # "latest" follows the newest version tag, for the older install URL @@ -85,4 +85,4 @@ jobs: else gh release create latest --title "Latest (v$VERSION)" --notes "$latest_notes" --latest=false fi - gh release upload latest dist/setup-gamescope-boot.sh --clobber + gh release upload latest dist/setup-gamescope-boot.sh assets/steam-gaming-settings.svg --clobber diff --git a/AGENTS.md b/AGENTS.md index 3094a4a..368966b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -149,6 +149,13 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine - The entry point loops: menu, run, "back to the menu" (or `[m]`/`[r]` when a restart is needed), until `q`; the restart question is asked once at the end. Scripted input that runs out ends the loop like `q`. +- Wizard shortcut (`launcher`): the icon runs `curl | bash` of + `releases/latest/download/setup-gamescope-boot.sh` in Konsole, so it's + always the newest release. Its icon, `assets/steam-gaming-settings.svg` + (Valve's GPL-2.0 return icon with a gear), is a release asset too, and is + downloaded from there (Steam's icon if that fails). Desktop files are + written with their mode already set (`install_executable`): Plasma opens a + desktop icon it first saw non-executable in an editor. - `Relogin=true` means a gamescope that fails to start is relaunched in a tight loop; keep that in mind when changing session handling. diff --git a/CHANGELOG.md b/CHANGELOG.md index 68ba3b0..93eccc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,18 @@ All notable changes, per version and per commit. Versions follow `setup-gamescope-boot.sh`. Versions before 0.7.0 were numbered afterwards, one per merged pull request. -## 0.8.0 - 2026-09-24 +## 0.9.0 - 2026-09-24 + +- **feat: Wizard shortcut on the desktop and in the launcher** + - New menu item: a "SteamOS Setup Wizard" desktop icon and app launcher entry + that open the newest release of the wizard in Konsole (`curl | bash`). + - Its icon: Valve's Return to Gaming Mode icon with a gear instead of the + arrow (`assets/steam-gaming-settings.svg`), published with every release + and downloaded from there. + - Desktop files are written already executable, so Plasma runs them instead + of opening them in an editor. + +## 0.8.0 - 2026-09-24 (#8) An opt-in BIOS update for the Steam Machine, and a menu that comes back after every run. @@ -40,7 +51,7 @@ every run. - "now F7F0107, newest F7F0108 (own risk)", "F7F0108 waits for a restart", "F7F0107 is up to date"; shorter dry-run line. - `99a95ab` **fix: Kernel legend only mentions the LEDs on a Steam Machine** -- **docs: Last commit hash in the changelog; 0.7.0 was released on its own (#6, #7)** +- `c0014ee` **docs: Last commit hash in the changelog; 0.7.0 was released on its own (#6, #7)** ## 0.7.0 - 2026-09-24 (#6, #7) diff --git a/README.md b/README.md index 87e49f7..b29c091 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,13 @@ Everything you turn off is put back the way it was. 4. **Single user mode** - like SteamOS: never a login or lock screen, no user switching or logging out. Typing a password with a controller is no fun. (Needs 1.) -5. **Steam Machine support** - only shown on a Valve Steam Machine: the +5. **Wizard shortcut** - a "SteamOS Setup Wizard" icon on the desktop and in + the app launcher (the Steam logo with a gear) that opens the newest version + of this wizard in Konsole, so you don't need the install command again. +6. **Steam Machine support** - only shown on a Valve Steam Machine: the driver for the front LED bar, and the hardware settings in Steam (fan, TV control over HDMI-CEC). -6. **Update BIOS** - only on a Steam Machine, opt-in and at your own risk: +7. **Update BIOS** - only on a Steam Machine, opt-in and at your own risk: installs the newest Steam Machine BIOS from Valve (see [BIOS updates](#bios-updates-steam-machine)). @@ -359,6 +362,7 @@ gamescope-session, ...) stay installed. | `lib/vapor-theme.sh` | SteamOS theme: installs and switches to `cachyos-vapor` | | `lib/steamos-extras.sh` | SteamOS desktop extras from Valve's package (Add to Steam, Nested Desktop, icon, keyboard rule, KWallet) | | `lib/single-user.sh` | Single user mode: no lock screen, user switching or log out | +| `lib/wizard-shortcut.sh` | Wizard shortcut: desktop icon and launcher entry that run the newest release | | `lib/bios.sh` | Update BIOS (Steam Machine, opt-in): current/newest version, double confirmation, fwupd | | `lib/steam-machine.sh` | Steam Machine support: LED driver, LED access, steamos-manager | | `.github/tools/bundle.sh` | Builds the single-file version (`dist/setup-gamescope-boot.sh`) | diff --git a/assets/steam-gaming-settings.svg b/assets/steam-gaming-settings.svg new file mode 100644 index 0000000..51c5e5f --- /dev/null +++ b/assets/steam-gaming-settings.svg @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/menu.sh b/lib/menu.sh index 5c4b842..c03fde2 100644 --- a/lib/menu.sh +++ b/lib/menu.sh @@ -5,7 +5,7 @@ # Menu order. Components are turned on in this order and off in reverse; # gaming must come first (single user builds on it). -COMPONENTS=(gaming theme glyphs single machine bios) +COMPONENTS=(gaming theme glyphs single launcher machine bios) # One-off actions rather than on/off components: never preselected, never # re-applied, not listed as on or off. ACTIONS=(bios) @@ -15,6 +15,7 @@ declare -A LABEL=( [theme]="Install SteamOS theme: Vapor look (cachyos-vapor)" [glyphs]="Install Steam Deck/Machine icons: Deck button icons in gaming mode" [single]="Single user mode: no password, lock screen or log out (SDDM)" + [launcher]="Wizard shortcut: desktop icon to run this wizard again" [machine]="Steam Machine support: LED bar driver, hardware settings in Steam" [bios]="Update BIOS" ) diff --git a/lib/wizard-shortcut.sh b/lib/wizard-shortcut.sh new file mode 100644 index 0000000..60288c4 --- /dev/null +++ b/lib/wizard-shortcut.sh @@ -0,0 +1,80 @@ +#!/bin/bash +# "Wizard shortcut" menu item: a desktop icon and an app launcher entry that +# open the newest release of this wizard in Konsole (curl | bash, like the +# install command in the README), so it's never out of date. +# Sourced by setup-gamescope-boot.sh; not meant to be run on its own. + +WIZARD_RELEASE="https://github.com/theupriser/cachyos-gamescope-boot/releases/latest/download" +WIZARD_URL="$WIZARD_RELEASE/setup-gamescope-boot.sh" +# Steam logo with a gear (assets/ in the repo, published with every release). +WIZARD_ICON="${XDG_DATA_HOME:-$HOME/.local/share}/icons/hicolor/scalable/apps/cachyos-gamescope-boot-wizard.svg" +WIZARD_LAUNCHER="${XDG_DATA_HOME:-$HOME/.local/share}/cachyos-gamescope-boot/run-wizard" +WIZARD_DESKTOP_NAME="cachyos-gamescope-boot-wizard.desktop" +WIZARD_APP_ENTRY="${XDG_DATA_HOME:-$HOME/.local/share}/applications/$WIZARD_DESKTOP_NAME" + +wizard_desktop_file() { + echo "$(xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop")/$WIZARD_DESKTOP_NAME" +} + +install_executable() { + # install_executable : stdin to , with its mode set + # before it appears. Plasma treats a desktop icon it saw while it wasn't + # executable yet as untrusted and opens it in an editor. + local dest="$1" tmp + mkdir -p "$(dirname "$dest")" + tmp="$(mktemp "$(dirname "$dest")/.tmp.XXXXXX")" + cat > "$tmp" + chmod "$2" "$tmp" + mv -f "$tmp" "$dest" +} + +launcher_status() { + [[ -x "$WIZARD_LAUNCHER" && -f "$WIZARD_APP_ENTRY" ]] +} + +launcher_enable() { + info "Adding the wizard shortcut (desktop icon and app launcher entry)..." + install_executable "$WIZARD_LAUNCHER" 755 << EOF +#!/bin/bash +# Installed by cachyos-gamescope-boot: run the newest release of the wizard. +if ! curl -fsSL --max-time 30 "$WIZARD_URL" | bash; then + echo + echo "Couldn't download or run the wizard. Are you connected to the internet?" +fi +echo +read -rp "Press Enter to close this window... " _ +EOF + + # The icon comes with the release; without it, Steam's own icon. + local icon=steam tmp + tmp="$(mktemp)" + if curl -fsSL --max-time 20 "$WIZARD_RELEASE/steam-gaming-settings.svg" -o "$tmp" && grep -q '/dev/null || true + else + warn "Couldn't download the shortcut's icon; using Steam's icon instead." + fi + rm -f "$tmp" + + local entry + entry="[Desktop Entry] +Type=Application +Name=SteamOS Setup Wizard +Comment=Turn the SteamOS-style parts of this PC on or off (cachyos-gamescope-boot) +Exec=konsole -e $WIZARD_LAUNCHER +Icon=$icon +Terminal=false +Categories=System;Settings;" + printf '%s\n' "$entry" | install_executable "$WIZARD_APP_ENTRY" 644 + printf '%s\n' "$entry" | install_executable "$(wizard_desktop_file)" 755 + kbuildsycoca6 >/dev/null 2>&1 || true + ok "Wizard shortcut added: \"SteamOS Setup Wizard\" on the desktop and in the launcher." +} + +launcher_disable() { + rm -f "$(wizard_desktop_file)" "$WIZARD_APP_ENTRY" "$WIZARD_LAUNCHER" "$WIZARD_ICON" + rmdir "$(dirname "$WIZARD_LAUNCHER")" 2>/dev/null || true + kbuildsycoca6 >/dev/null 2>&1 || true + ok "Wizard shortcut removed." +} diff --git a/setup-gamescope-boot.sh b/setup-gamescope-boot.sh index 5da934b..be759b6 100755 --- a/setup-gamescope-boot.sh +++ b/setup-gamescope-boot.sh @@ -15,11 +15,11 @@ set -uo pipefail # Release version, see CHANGELOG.md. -VERSION=0.8.0 +VERSION=0.9.0 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -for lib in common state packages login-manager single-user steam-desktop steam-machine vapor-theme steamos-extras bios desktop-shortcut menu; do +for lib in common state packages login-manager single-user steam-desktop steam-machine vapor-theme steamos-extras bios desktop-shortcut wizard-shortcut menu; do # shellcheck source=/dev/null source "$SCRIPT_DIR/lib/$lib.sh" done