Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
6f5dc01876 |
|||
|
|
f912f491e2 |
6 changed files with 840 additions and 705 deletions
|
|
@ -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
|
||||
[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
|
||||
|
||||
|
|
@ -8,4 +11,4 @@
|
|||
- To obtain a SteamGridDB API Key, login/register at [SteamGridDB](https://www.steamgriddb.com/). You can then generate an API Key [here](https://www.steamgriddb.com/profile/preferences/api)
|
||||
|
||||
## Caveats
|
||||
You can only have one application open at at time
|
||||
You can only have one application open at at time
|
||||
|
|
|
|||
11
main.py
11
main.py
|
|
@ -10,6 +10,8 @@ from subprocess import Popen, PIPE
|
|||
from urllib.error import HTTPError
|
||||
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"]
|
||||
|
||||
|
|
@ -44,7 +46,7 @@ class Plugin:
|
|||
flatpaks.append({
|
||||
"id": app_id,
|
||||
"name": name,
|
||||
"exec": f"/usr/bin/flatpak run {app_id}"
|
||||
"exec": f"{FLATPAK_RUNNER} run {app_id}"
|
||||
})
|
||||
|
||||
return flatpaks
|
||||
|
|
@ -75,6 +77,7 @@ class Plugin:
|
|||
for desktopFile in chain(
|
||||
Path("/usr/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():
|
||||
continue
|
||||
|
|
@ -88,8 +91,12 @@ class Plugin:
|
|||
package["name"] = line[5:]
|
||||
elif line.startswith("Exec="):
|
||||
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:
|
||||
decky_plugin.logger.info("+ Desktop app: " + package["name"])
|
||||
packages.append(package)
|
||||
break
|
||||
|
||||
|
|
|
|||
10
package.json
10
package.json
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "sdh-quicklaunch",
|
||||
"name": "sdh-quicklaunch-anatase",
|
||||
"version": "1.2.1",
|
||||
"description": "Quickly launch apps from the Steam Deck Quick Access Menu without adding them as shortcuts",
|
||||
"scripts": {
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Fisch03/SDH-QuickLaunch.git"
|
||||
"url": "git+https://gitdab.com/dj/SDH-QuickLaunch-Anatase.git"
|
||||
},
|
||||
"keywords": [
|
||||
"decky",
|
||||
|
|
@ -17,12 +17,12 @@
|
|||
"steam-deck",
|
||||
"deck"
|
||||
],
|
||||
"author": "Fisch03",
|
||||
"author": "Fisch03 & djsime1",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"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": {
|
||||
"@rollup/plugin-commonjs": "^21.1.0",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
{
|
||||
"name": "Quick Launch",
|
||||
"author": "Fisch03",
|
||||
"author": "Fisch03 & djsime1",
|
||||
"flags": ["root"],
|
||||
"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.",
|
||||
"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
1598
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -10,6 +10,7 @@ export async function launchApp(sAPI: ServerAPI, app: App) {
|
|||
SteamClient.Apps.SetShortcutName(id, `[QL] ${app.name}`)
|
||||
SteamClient.Apps.SetShortcutLaunchOptions(id, getLaunchOptions(app))
|
||||
SteamClient.Apps.SetShortcutExe(id, `"${getTarget(app)}"`)
|
||||
SteamClient.Apps.SetShortcutStartDir(id, "/app/bin")
|
||||
SteamClient.Apps.SpecifyCompatTool(id, app.compatTool === undefined ? "" : app.compatTool)
|
||||
|
||||
setTimeout(() => {
|
||||
|
|
@ -39,6 +40,7 @@ export function createAppShortcut(sAPI: ServerAPI, app: App, settings: Settings,
|
|||
SteamClient.Apps.SetShortcutName(id, app.name);
|
||||
SteamClient.Apps.SetShortcutLaunchOptions(id, shortcutLaunchOptions);
|
||||
SteamClient.Apps.SetShortcutExe(id, `"${shortcutTarget}"`);
|
||||
SteamClient.Apps.SetShortcutStartDir(id, "/app/bin")
|
||||
SteamClient.Apps.SpecifyCompatTool(id, app.compatTool === undefined ? "" : app.compatTool);
|
||||
}, 500)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue