aside.boilerplate.hooks module¶
Common code for user hooks.
- public_attrs(obj: object) → Dict[str, Any][source]¶
Extract all object attributes and values, which are considered public.
- update_attrs(default: object, changed: type, name: str, verbose: bool)[source]¶
Propagate the user-defined attribute changes to the default object.
- load_user_hooks(hook_dirs: Optional[List[PathLike]] = None) → None[source]¶
Import and load the user hook files.
User hook files are searched in all the configuration directories, as specified by the XDG Base Directory Specification. The hook files (if present) are loaded in the following order:
aside/**.pyin every directory specified in${XDG_CONFIG_DIRS}in order of preference${XDG_CONFIG_HOME}/aside/**.py
The hook files in each directory are imported and evaluated in lexicographic order. To overwrite the application configuration and theme, the
aside.config.register_configandaside.theme.register_themehooks can be used.