pijuice_sys re-implementation #583
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Pijuice-team,
since i had several problems integrating
pijuice_syson non-raspbian distributions i figured i could reimplement pijuice_sys and add several improvements on how things work.i think this PR might help with multiple open issues and feature-requests as well.
this PR includes several things:
changes to
setup.pysetuptoolsallows explicit definition of dependenciessetuptoolsallows the definition ofentry_pointsto better separate implementation and the name of a command when installedfunctools.partialallows better separation of settings that are common topijuice-baseandpijuice-guiand of settings that are different, making the file more readable and maintainablepijuice_cmdallows shell access to
wakeup-on-charge,system-power-switch,power-offandled-blink.it is used in the new system-function-scripts and can be used in user-function-scripts.
pijuice_sys-reimplementationmarshmallowto define proper schemas for the configuration file to allow validation.HALT_FILEsystemd-service changes
the systemd-service is now seperated into
pijuiceandpijuice-poweroff.pijuice-poweroffis started when the system is being shutdown.general notes
i tried to make this a drop-in replacement as much as possible.
the only changes that are not backward compatible:
pijuice_sysUSER_FUNCXnow MUST be the path of a file and cannot be a command itself.SYS_FUNC_HALTandSYS_FUNC_HALT_POW_OFFnow executessystemctl poweroffinstead ofhaltas i think this is more appropriateanyway, that's it.
let me know of you have any thoughts on this, any requests etc.