From 2b3f1de75acd167e84d8ba2261fc77e8effa76dc Mon Sep 17 00:00:00 2001 From: rickpeters Date: Fri, 25 Sep 2026 21:32:24 +0200 Subject: [PATCH] feat: The Steamify shortcut opens the app Steamify CachyOS on the desktop and in the launcher starts the newest app (in Konsole the first time, while PySide6 still has to be installed); the terminal menu is Steamify Terminal in the launcher. A shortcut from before 2.0.1 is ticked in the menu, so a normal run replaces it. steamify-app.sh leaves the shortcut's launcher entry (same id) alone. --- AGENTS.md | 11 +++++-- CHANGELOG.md | 10 ++++++ README.md | 5 +-- lib/menu.sh | 5 ++- lib/wizard-shortcut.sh | 75 ++++++++++++++++++++++++++++++++++-------- steamify.sh | 2 +- ui/qml/Main.qml | 5 +-- ui/steamify-app.sh | 5 ++- 8 files changed, 94 insertions(+), 24 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 4d60d51..9bd48d3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -161,9 +161,14 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine now? [Y/n]" (`quit_prompt`): `n` goes back to the menu, the next `q` asks again. Scripted input that runs out quits without restarting (never restart on EOF: `ask_yn` would take its default). -- Steamify shortcut (`launcher`): the icon runs `curl | bash` of - `releases/latest/download/steamify.sh` in Konsole, so it's - always the newest release. Its icon, `assets/steam-gaming-settings.svg` +- Steamify shortcut (`launcher`): "Steamify CachyOS" (desktop and launcher, + id `steamify-ui.desktop`, the app's own id) runs `curl | bash` of + `releases/latest/download/steamify-app.sh` without a terminal (in Konsole + only while PySide6 is missing, for sudo); "Steamify Terminal" (launcher) + runs `steamify.sh` in Konsole. Both always the newest release. The entry + has `X-Steamify-Shortcut=true`: steamify-app.sh doesn't overwrite it, and + disable only removes it then. A pre-2.0.1 shortcut (terminal only) is + ticked by `launcher_repair`. 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a28907..35b32b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes, per version and per commit. Versions follow `steamify.sh`. Versions before 0.7.0 were numbered afterwards, one per merged pull request. +## 2.0.1 - 2026-09-25 + +- **feat: The Steamify shortcut opens the app** + - "Steamify CachyOS" on the desktop and in the launcher starts the newest + app (in Konsole the first time, if PySide6 still has to be installed). + The terminal menu is "Steamify Terminal" in the launcher. A shortcut from + before 2.0.1 is ticked in the menu, so a normal run replaces it. + - steamify-app.sh leaves the shortcut's launcher entry alone (it has the + same id, `steamify-ui.desktop`, and always starts the newest release). + ## 2.0.0 - 2026-09-25 - **feat: Steamify app (v2 UI)** diff --git a/README.md b/README.md index 6180589..b366a54 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,9 @@ Steam Machine. KDE wallet password prompts (e.g. from Brave). Typing a password with a controller is no fun ([details](TECHNICAL.md#single-user-mode-sddm-no-locking)). -5. **Steamify shortcut** - an icon on the desktop and in the launcher that - opens the newest Steamify, so you don't need the install command again. +5. **Steamify shortcut** - "Steamify CachyOS" on the desktop and in the + launcher opens the newest Steamify app, so you don't need the install + command again. "Steamify Terminal" in the launcher opens the terminal menu. 6. **HDMI-CEC** (experimental; off by default, on by default on a Steam Machine) - use Steam with your TV's remote, and the TV turns on and off with the PC. Needs a PC with CEC (like diff --git a/lib/menu.sh b/lib/menu.sh index 6ed5eb4..9fe7e97 100644 --- a/lib/menu.sh +++ b/lib/menu.sh @@ -24,7 +24,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]="Steamify shortcut: desktop icon to run this again" + [launcher]="Steamify shortcut: the app on the desktop, Steamify Terminal in the launcher" [cec]="HDMI-CEC: use Steam with the TV remote, TV on/off with the PC (experimental)" [machine]="Steam Machine support: LED bar driver, hardware settings in Steam" [kpin]="Pin the kernel to $PINNED_KERNEL_VER (fixes rebooting after shutdown)" @@ -72,6 +72,9 @@ detect_components() { done # HDMI-CEC set up by an older version: tick it, so a normal run fixes it. component_available cec && cec_repair && WANTED[cec]=1 + # The terminal-only Steamify shortcut from before 2.0.1: tick it, so a + # normal run replaces it with the app. + launcher_repair && WANTED[launcher]=1 # Shows the current and newest BIOS version. bios_available && { bios_lookup_newest; LABEL[bios]="$(bios_label)"; } # First run: preselect the full SteamOS experience (never an action). diff --git a/lib/wizard-shortcut.sh b/lib/wizard-shortcut.sh index 6a3a9fd..63bd085 100644 --- a/lib/wizard-shortcut.sh +++ b/lib/wizard-shortcut.sh @@ -1,19 +1,29 @@ #!/bin/bash -# "Steamify shortcut" menu item: a desktop icon and an app launcher entry that -# open the newest release of Steamify CachyOS in Konsole (curl | bash, like the -# install command in the README), so it's never out of date. +# "Steamify shortcut" menu item: "Steamify CachyOS" on the desktop and in the +# app launcher opens the newest release of the app (curl | bash of +# steamify-app.sh, like the install command in the README), so it's never out +# of date; "Steamify Terminal" in the launcher opens the terminal menu in +# Konsole the same way. # Sourced by steamify.sh; not meant to be run on its own. WIZARD_RELEASE="https://github.com/theupriser/steamify-cachyos/releases/latest/download" WIZARD_URL="$WIZARD_RELEASE/steamify.sh" +WIZARD_APP_URL="$WIZARD_RELEASE/steamify-app.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_APP_LAUNCHER="${XDG_DATA_HOME:-$HOME/.local/share}/cachyos-gamescope-boot/run-app" +WIZARD_APPS="${XDG_DATA_HOME:-$HOME/.local/share}/applications" +# steamify-ui: the id the app gives itself, so its window belongs to this +# entry. steamify-app.sh leaves an entry with X-Steamify-Shortcut alone. +WIZARD_DESKTOP_NAME="steamify-ui.desktop" +WIZARD_APP_ENTRY="$WIZARD_APPS/$WIZARD_DESKTOP_NAME" +WIZARD_TERMINAL_ENTRY="$WIZARD_APPS/steamify-terminal.desktop" +# Before 2.0.1 the shortcut opened the terminal menu under this name. +WIZARD_OLD_NAME="cachyos-gamescope-boot-wizard.desktop" -wizard_desktop_file() { - echo "$(xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop")/$WIZARD_DESKTOP_NAME" +wizard_desktop_dir() { + xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop" } install_executable() { @@ -29,11 +39,15 @@ install_executable() { } launcher_status() { - [[ -x "$WIZARD_LAUNCHER" && -f "$WIZARD_APP_ENTRY" ]] + [[ -x "$WIZARD_APP_LAUNCHER" && -x "$WIZARD_LAUNCHER" && -f "$WIZARD_APP_ENTRY" && -f "$WIZARD_TERMINAL_ENTRY" ]] } +# A shortcut from before 2.0.1 (terminal only): the menu ticks the item, so a +# normal run replaces it. +launcher_repair() { [[ -f "$WIZARD_APPS/$WIZARD_OLD_NAME" ]] && ! launcher_status; } + launcher_enable() { - info "Adding the Steamify shortcut (desktop icon and app launcher entry)..." + info "Adding the Steamify shortcut (the app on the desktop and in the launcher, Steamify Terminal in the launcher)..." install_executable "$WIZARD_LAUNCHER" 755 << EOF #!/bin/bash # Installed by Steamify CachyOS: run its newest release. @@ -53,6 +67,23 @@ for (( i = 10; i > 0; i-- )); do read -rs -t 1 _ && break done echo +EOF + + # The app, without a terminal. Only the first time, when PySide6 still + # has to be installed, it runs in Konsole: sudo asks for the password there. + install_executable "$WIZARD_APP_LAUNCHER" 755 << EOF +#!/bin/bash +# Installed by Steamify CachyOS: start the newest release of its app. +set -o pipefail +if [[ "\${1:-}" != --in-terminal ]] && ! python3 -c 'import PySide6.QtQml' 2>/dev/null; then + exec konsole -e "\$0" --in-terminal +fi +if ! curl -fsSL --max-time 30 "$WIZARD_APP_URL" | bash; then + msg="Couldn't download or start Steamify. Are you connected to the internet?" + if [[ "\${1:-}" == --in-terminal ]]; then echo; echo "\$msg"; read -rp "Press Enter to close this window... " _ + else kdialog --title Steamify --sorry "\$msg" 2>/dev/null; fi + exit 1 +fi EOF # The icon comes with the release; without it, Steam's own icon. @@ -72,18 +103,34 @@ EOF Type=Application Name=Steamify CachyOS Comment=Turn the SteamOS-style parts of this PC on or off +Exec=$WIZARD_APP_LAUNCHER +Icon=$icon +Terminal=false +Categories=Game;System;Settings; +X-Steamify-Shortcut=true" + printf '%s\n' "$entry" | install_executable "$WIZARD_APP_ENTRY" 644 + printf '%s\n' "$entry" | install_executable "$(wizard_desktop_dir)/$WIZARD_DESKTOP_NAME" 755 + printf '%s\n' "[Desktop Entry] +Type=Application +Name=Steamify Terminal +Comment=Steamify CachyOS's menu in a terminal Exec=konsole -e $WIZARD_LAUNCHER Icon=$icon Terminal=false -Categories=Game;System;Settings;" - printf '%s\n' "$entry" | install_executable "$WIZARD_APP_ENTRY" 644 - printf '%s\n' "$entry" | install_executable "$(wizard_desktop_file)" 755 +Categories=Game;System;Settings;" | install_executable "$WIZARD_TERMINAL_ENTRY" 644 + # The terminal-only shortcut from before 2.0.1. + rm -f "$(wizard_desktop_dir)/$WIZARD_OLD_NAME" "$WIZARD_APPS/$WIZARD_OLD_NAME" kbuildsycoca6 >/dev/null 2>&1 || true - ok "Steamify shortcut added: \"Steamify CachyOS\" on the desktop and in the launcher." + ok "Steamify shortcut added: \"Steamify CachyOS\" (the app) on the desktop and in the launcher, \"Steamify Terminal\" in the launcher." } launcher_disable() { - rm -f "$(wizard_desktop_file)" "$WIZARD_APP_ENTRY" "$WIZARD_LAUNCHER" "$WIZARD_ICON" + # The launcher entry only if it's ours: steamify-app.sh writes its own + # under the same name when there's no shortcut. + grep -q '^X-Steamify-Shortcut=true' "$WIZARD_APP_ENTRY" 2>/dev/null && rm -f "$WIZARD_APP_ENTRY" + rm -f "$(wizard_desktop_dir)/$WIZARD_DESKTOP_NAME" "$WIZARD_TERMINAL_ENTRY" \ + "$(wizard_desktop_dir)/$WIZARD_OLD_NAME" "$WIZARD_APPS/$WIZARD_OLD_NAME" \ + "$WIZARD_LAUNCHER" "$WIZARD_APP_LAUNCHER" "$WIZARD_ICON" rmdir "$(dirname "$WIZARD_LAUNCHER")" 2>/dev/null || true kbuildsycoca6 >/dev/null 2>&1 || true ok "Steamify shortcut removed." diff --git a/steamify.sh b/steamify.sh index 5ff1141..bdecfc4 100755 --- a/steamify.sh +++ b/steamify.sh @@ -15,7 +15,7 @@ set -uo pipefail # Release version, see CHANGELOG.md. -VERSION=2.0.0 +VERSION=2.0.1 SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/ui/qml/Main.qml b/ui/qml/Main.qml index 4b17a5a..47b019c 100644 --- a/ui/qml/Main.qml +++ b/ui/qml/Main.qml @@ -60,8 +60,9 @@ ApplicationWindow { single: { label: "Single user mode", hint: "No password, lock screen or wallet prompts", body: "Like SteamOS: never a login or lock screen, and no KDE wallet password prompts. Typing a password with a controller is no fun.", changes: ["SDDM autologin, no lock screen or user switching", "Valve's empty wallet; your own is kept aside", "Launcher shows Sleep, Restart, Shut Down only"] }, - launcher: { label: "Steamify shortcut", hint: "Icon on the desktop and in the launcher", - body: "Opens the newest Steamify, so you never need the install command again.", changes: ["Desktop icon and launcher entry"] }, + launcher: { label: "Steamify shortcut", hint: "The app on the desktop and in the launcher", + body: "Opens the newest Steamify app, so you never need the install command again. Steamify Terminal in the launcher opens the terminal menu.", + changes: ["Steamify CachyOS on the desktop and in the launcher (the app)", "Steamify Terminal in the launcher"] }, cec: { label: "HDMI-CEC", hint: "Use Steam with the TV remote, TV on/off with the PC", experimental: true, body: "Use Steam with your TV remote, and the TV turns on and off with the PC. Turn on CEC on the TV too (Sony: BRAVIA Sync, Samsung: Anynet+, LG: SimpLink).", changes: ["Valve's cecd and cec-audio-control", "HDMI CEC section in Steam's Display settings", "Volume buttons for the TV in the Quick Access menu"] }, diff --git a/ui/steamify-app.sh b/ui/steamify-app.sh index 4fe1b83..6cafcec 100755 --- a/ui/steamify-app.sh +++ b/ui/steamify-app.sh @@ -53,8 +53,11 @@ if ! python3 -c 'import PySide6.QtQml' 2>/dev/null; then sudo pacman -S --needed --noconfirm pyside6 /dev/null || cat > "$APPS/steamify-ui.desktop" << EOF [Desktop Entry] Type=Application