qm plugin protocol with example. A "file manager" plugin example is written in shell script, python and zig # Protocol ## Input Plugins get inputs as environment variables.\ The environment variable `ACTION` is set to `get` to get data.\ The environment variable `URL` is set to _url_ relevant to the page, so for example for a file manager `URL` is set to the directory to display files of. ## Output Plugins output data by writing lines to stdout.\ Data is first written to stdout and then a _command_ is written to stdout.\ First `add_tab` command is expected, followed by multiple `add_body_item`. The body items are put in the tab that is output before the body items. ### add_tab The add_tab command expects `title` data, for example: ```bash echo "title Files" echo "add_tab" ``` ### add_body_item The add_body_item command expects `title` and `url` data and optionally `thumbnail_url` and `thumbnail_size`, for example: ```bash echo "title file.png" echo "url img1.png" echo "thumbnail_url img1.png" echo "thumbnail_size 1920x1080" echo "add_body_item" echo "title img2.png" echo "url img2.png" echo "thumbnail_url img2.png" echo "thumbnail_size 1280x720" echo "add_body_item" ```