WerWolv / Hekate-Toolbox

A toolbox for Hekate
GNU General Public License v3.0
213 stars 24 forks source link

Allow sysmodules to write their own Kosmos Toolbox config #24

Closed cathery closed 4 years ago

cathery commented 4 years ago

Currently Kosmos Toolbox has a preset config.json that lists the configurations for each custom sysmodule. This prevents custom sysmodules from additively including themselves in the config. This pull request allows each custom sysmodule not supported by Kosmos Toolbox to define their own toolbox.json located in the sdmc:/atmosphere/contents/%016lx/toolbox.json which contains a single sysmodule configuration in JSON format.

Example:

I have a sysmodule with a Program ID of 0100000000000999. With a config located in sdmc:/atmosphere/contents/0100000000000999/toolbox.json, and its contents defined like:

{
    "name"  : "sys-something",
    "tid"   : "0100000000000999",
    "requires_reboot": false
}

Kosmos Toolbox will incude sys-something in its list of background services as a valid sysmodule that can be turned on and off without reboot.