tza 8c142c01bd hot reloading, plugin instantiation, plugin main method
- The Loader now watches for file changes in the plugin directory, and will (re)import when a new plugin is created, or an existing one is modified. This is implemented by means of the watchdog library
- Plugin classes are now instantiated (and therefore require a self arg in every method). This way they can maintain a state during the runtime of the loader (or until they are reloaded), and share data between methods.
- Plugins can now have a __main() method, which can include long-running code. Every plugin's main method is ran in a separate asyncio task.
- Plugin methods that start from __ are now uncallable from javascript. This can be helpful when implementing unfinished/development versions of methods.
2022-04-04 18:10:02 +03:00
2022-04-03 23:50:26 +03:00
2022-04-03 23:50:26 +03:00
2022-04-01 16:50:41 +02:00
2022-04-03 23:50:26 +03:00

Plugin Loader

steamuserimages-a akamaihd

Installation

  • Go into the Steam Deck Settings
  • Under System -> System Settings toggle Enable Developer Mode
  • Scroll the sidebar all the way down and click on Developer
  • Under Miscellaneous, enable CEF Remote Debugging
  • Place the executable under ~/homebrew/services/plugin_loader. Do not change the name of the file.
  • Place the plugin_manager.service file under /etc/systemd/system
  • Open a Terminal and type systemctl --now --user enable plugin_manager

Install Plugins

  • Simply copy the plugin's .py file into ~/homebrew/plugins

Features

  • Clean injecting and loading of one or more plugins
  • Persistent. It doesn't need to be reinstalled after every system update
  • Allows 2-way communication between the plugins and the loader.
  • Allows plugins to define python functions and run them from javascript.
  • Allows plugins to make fetch calls, bypassing cors completely.

Credit

The original idea for the concept is based on the work of marios8543's steamdeck-ui-inject project.

Description
Languages
TypeScript 56.2%
Python 39.6%
Shell 2%
JavaScript 1.6%
Nix 0.6%