Compare commits

...

2 commits

Author SHA1 Message Date
6f5dc01876
Changes for Anatase compatibility 2026-09-09 14:28:31 -05:00
sakanaa
f912f491e2
Add deprecation notice 2025-12-01 04:36:04 +01:00
6 changed files with 840 additions and 705 deletions

View file

@ -1,3 +1,6 @@
> [!TIP]
> This is a fork of [Quick Launch by Fisch03](https://github.com/Fisch03/SDH-QuickLaunch) that has been modified to work on [Anatase](https://anatase.org/). Since Anatase runs Steam in a Flatpak, launching other Flatpaks and apps doesn't normally work. The purpose of this fork is to replace calls to /usr/bin/flatpak to /app/bin/flatpak, which is a wrapper that allows launching other Flatpaks within Anatase's Steam package.
# SDH-QuickLaunch # SDH-QuickLaunch
[Decky Loader](https://github.com/SteamDeckHomebrew/PluginLoader) Plugin to quickly launch Apps from the Quick Access Menu without adding them as shortcuts, and add new shortcuts entirely [Decky Loader](https://github.com/SteamDeckHomebrew/PluginLoader) Plugin to quickly launch Apps from the Quick Access Menu without adding them as shortcuts, and add new shortcuts entirely

11
main.py
View file

@ -10,6 +10,8 @@ from subprocess import Popen, PIPE
from urllib.error import HTTPError from urllib.error import HTTPError
from urllib.request import urlopen, Request from urllib.request import urlopen, Request
FLATPAK_RUNNER = "flatpak" # or explicitly: /app/bin/flatpak
HOST_RUNNER = "hrun" # or explicitly: /app/bin/hrun
confdir = os.environ["DECKY_PLUGIN_SETTINGS_DIR"] confdir = os.environ["DECKY_PLUGIN_SETTINGS_DIR"]
@ -44,7 +46,7 @@ class Plugin:
flatpaks.append({ flatpaks.append({
"id": app_id, "id": app_id,
"name": name, "name": name,
"exec": f"/usr/bin/flatpak run {app_id}" "exec": f"{FLATPAK_RUNNER} run {app_id}"
}) })
return flatpaks return flatpaks
@ -75,6 +77,7 @@ class Plugin:
for desktopFile in chain( for desktopFile in chain(
Path("/usr/share/applications").glob("*.desktop"), Path("/usr/share/applications").glob("*.desktop"),
Path(f"{decky_plugin.DECKY_USER_HOME}/.local/share/applications/").glob("*.desktop"), Path(f"{decky_plugin.DECKY_USER_HOME}/.local/share/applications/").glob("*.desktop"),
Path("/var/usrlocal/share/applications").glob("*.desktop"),
): ):
if not desktopFile.is_file(): if not desktopFile.is_file():
continue continue
@ -88,8 +91,12 @@ class Plugin:
package["name"] = line[5:] package["name"] = line[5:]
elif line.startswith("Exec="): elif line.startswith("Exec="):
foundExec = True foundExec = True
package["exec"] = line[5:] execTarget = line[5:].split(" ", 1)
decky_plugin.logger.info("- Exec path: " + str(execTarget))
runner = FLATPAK_RUNNER if execTarget[0].endswith("flatpak") else HOST_RUNNER
package["exec"] = f"{runner} {execTarget[1]}"
if foundName and foundExec: if foundName and foundExec:
decky_plugin.logger.info("+ Desktop app: " + package["name"])
packages.append(package) packages.append(package)
break break

View file

@ -1,5 +1,5 @@
{ {
"name": "sdh-quicklaunch", "name": "sdh-quicklaunch-anatase",
"version": "1.2.1", "version": "1.2.1",
"description": "Quickly launch apps from the Steam Deck Quick Access Menu without adding them as shortcuts", "description": "Quickly launch apps from the Steam Deck Quick Access Menu without adding them as shortcuts",
"scripts": { "scripts": {
@ -9,7 +9,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/Fisch03/SDH-QuickLaunch.git" "url": "git+https://gitdab.com/dj/SDH-QuickLaunch-Anatase.git"
}, },
"keywords": [ "keywords": [
"decky", "decky",
@ -17,12 +17,12 @@
"steam-deck", "steam-deck",
"deck" "deck"
], ],
"author": "Fisch03", "author": "Fisch03 & djsime1",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"bugs": { "bugs": {
"url": "https://github.com/Fisch03/SDH-QuickLaunch/issues" "url": "https://gitdab.com/dj/SDH-QuickLaunch-Anatase/issues"
}, },
"homepage": "https://github.com/Fisch03/SDH-QuickLaunch#readme", "homepage": "https://gitdab.com/dj/SDH-QuickLaunch-Anatase",
"devDependencies": { "devDependencies": {
"@rollup/plugin-commonjs": "^21.1.0", "@rollup/plugin-commonjs": "^21.1.0",
"@rollup/plugin-json": "^4.1.0", "@rollup/plugin-json": "^4.1.0",

View file

@ -1,11 +1,10 @@
{ {
"name": "Quick Launch", "name": "Quick Launch",
"author": "Fisch03", "author": "Fisch03 & djsime1",
"flags": ["root"], "flags": ["root"],
"publish": { "publish": {
"discord_id": "431374517462499328",
"description": "Quickly Launch Non-Steam-Apps from the Quick Access menu without adding them as Shortcuts, or add them to the Steam Library.", "description": "Quickly Launch Non-Steam-Apps from the Quick Access menu without adding them as Shortcuts, or add them to the Steam Library.",
"tags": [ "utility" ], "tags": [ "utility" ],
"image": "https://raw.githubusercontent.com/Fisch03/SDH-QuickLaunch/master/ui_full.png" "image": "https://gitdab.com/dj/SDH-QuickLaunch-Anatase/raw/branch/master/ui_full.png"
} }
} }

1598
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,7 @@ export async function launchApp(sAPI: ServerAPI, app: App) {
SteamClient.Apps.SetShortcutName(id, `[QL] ${app.name}`) SteamClient.Apps.SetShortcutName(id, `[QL] ${app.name}`)
SteamClient.Apps.SetShortcutLaunchOptions(id, getLaunchOptions(app)) SteamClient.Apps.SetShortcutLaunchOptions(id, getLaunchOptions(app))
SteamClient.Apps.SetShortcutExe(id, `"${getTarget(app)}"`) SteamClient.Apps.SetShortcutExe(id, `"${getTarget(app)}"`)
SteamClient.Apps.SetShortcutStartDir(id, "/app/bin")
SteamClient.Apps.SpecifyCompatTool(id, app.compatTool === undefined ? "" : app.compatTool) SteamClient.Apps.SpecifyCompatTool(id, app.compatTool === undefined ? "" : app.compatTool)
setTimeout(() => { setTimeout(() => {
@ -39,6 +40,7 @@ export function createAppShortcut(sAPI: ServerAPI, app: App, settings: Settings,
SteamClient.Apps.SetShortcutName(id, app.name); SteamClient.Apps.SetShortcutName(id, app.name);
SteamClient.Apps.SetShortcutLaunchOptions(id, shortcutLaunchOptions); SteamClient.Apps.SetShortcutLaunchOptions(id, shortcutLaunchOptions);
SteamClient.Apps.SetShortcutExe(id, `"${shortcutTarget}"`); SteamClient.Apps.SetShortcutExe(id, `"${shortcutTarget}"`);
SteamClient.Apps.SetShortcutStartDir(id, "/app/bin")
SteamClient.Apps.SpecifyCompatTool(id, app.compatTool === undefined ? "" : app.compatTool); SteamClient.Apps.SpecifyCompatTool(id, app.compatTool === undefined ? "" : app.compatTool);
}, 500) }, 500)
}) })