diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 22881ed..d638c86 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -99,7 +99,7 @@ "detail": "", "type": "shell", "group": "none", - "command": "echo '${config:deckdir}/homebrew/plugins/${config:pluginname}.zip' && ssh ${config:deckuser}@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo ${config:deckpass} | sudo -S mkdir 755 -p \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|\")\" && echo ${config:deckpass} | sudo -S chown ${config:deckuser}:${config:deckuser} \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|\")\" && echo ${config:deckpass} | sudo -S bsdtar -xzpf \"${config:deckdir}/homebrew/plugins/${config:pluginname}.zip\" -C \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|g\")\" --strip-components=1 --fflags '", + "command": "echo '${config:deckdir}/homebrew/plugins/${config:pluginname}.zip' && ssh ${config:deckuser}@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo ${config:deckpass} | sudo -S mkdir 755 -p \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|g\")\" && echo ${config:deckpass} | sudo -S chown ${config:deckuser}:${config:deckuser} \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|g\")\" && echo ${config:deckpass} | sudo -S bsdtar -xzpf \"${config:deckdir}/homebrew/plugins/${config:pluginname}.zip\" -C \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|g\")\" --strip-components=1 --fflags '", "problemMatcher": [] }, //"All-in-one" deploy task diff --git a/README.md b/README.md index 1402922..2e63574 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,8 @@ sudo npm i -g pnpm@8.5.1 If you would like to build plugins that have their own custom backends, Docker is required as it is used by the Decky CLI tool. - - ### Making your own plugin -If you use VSCode or it's derivatives (we suggest [VSCodium](https://vscodium.com/)!) just run the `setup` and `build` tasks. It's really that simple. - 1. You can fork this repo or utilize the "Use this template" button on Github. 2. In your local fork/own plugin-repository run these commands: 1. ``pnpm i`` @@ -34,7 +30,7 @@ If you use VSCode or it's derivatives (we suggest [VSCodium](https://vscodium.co 3. Consult the [decky-frontend-lib](https://github.com/SteamDeckHomebrew/decky-frontend-lib) repository for ways to accomplish your tasks. - Documentation and examples are still rough, - While decky-loader primarily targets Steam Deck hardware so keep this in mind when developing your plugin. -4. Run the `setup` and `build` and `deploy` vscode tasks, or you can derive your own makefile or just manually utilize the scripts for these commands as you see fit. +4. If using VSCodium/VSCode, run the `setup` and `build` and `deploy` tasks. If not using VSCodium etc. you can derive your own makefile or just manually utilize the scripts for these commands as you see fit. If you use VSCode or it's derivatives (we suggest [VSCodium](https://vscodium.com/)!) just run the `setup` and `build` tasks. It's really that simple. diff --git a/main.py b/main.py index b177c84..17f1b15 100644 --- a/main.py +++ b/main.py @@ -20,8 +20,15 @@ class Plugin: self.loop = asyncio.get_event_loop() decky.logger.info("Hello World!") - # Function called first during the unload process, utilize this to handle your plugin being removed + # Function called first during the unload process, utilize this to handle your plugin being stopped, but not + # completely removed async def _unload(self): + decky.logger.info("Goodnight World!") + pass + + # Function called after `_unload` during uninstall, utilize this to clean up processes and other remnants of your + # plugin that may remain on the system + async def _uninstall(self): decky.logger.info("Goodbye World!") pass