[core] Allow module loading from user directory

If a module fails to load from both core and contrib, fall back to
loading by file name from "~/.config/bumblebee-status/modules/<name>.py"

fixes #757
This commit is contained in:
tobi-wan-kenobi 2021-01-17 14:18:58 +01:00
parent 413abdcae7
commit 21ded8f640
2 changed files with 10 additions and 1 deletions

View file

@ -11,6 +11,7 @@ Adding a new module to ``bumblebee-status`` is straight-forward:
``bumblebee-status`` (i.e. a module called
``bumblebee_status/modules/contrib/test.py`` will be loaded using
``bumblebee-status -m test``)
- Alternatively, you can put your module in ``~/.config/bumblebee-status/modules/``
- The module name must follow the `Python Naming Conventions <https://www.python.org/dev/peps/pep-0008/#package-and-module-names>`_
- See below for how to actually write the module
- Test (run ``bumblebee-status`` in the CLI)