refactor(src/utils): adjust base path constants and add toml_file helper
This commit is contained in:
1 file changed
+9
-1
+9
-1
@@ -52,7 +52,10 @@ def setup_cursor_hover(
|
||||
)
|
||||
|
||||
|
||||
# Base path to your SVG assets (resolve from repository root)
|
||||
# Base path to config directory
|
||||
BASE_CONFIG_PATH = (Path(__file__).resolve().parent.parent.parent / "config").resolve()
|
||||
|
||||
# Base path to SVG assets
|
||||
BASE_SVG_PATH = (Path(__file__).resolve().parent.parent / "assets" / "icons").resolve()
|
||||
|
||||
|
||||
@@ -111,6 +114,11 @@ def svg_file(relative_path: str, **kwargs) -> Svg:
|
||||
return svg
|
||||
|
||||
|
||||
def toml_file(relative_path: str) -> str:
|
||||
"""Return absolute path to a TOML file in config/."""
|
||||
return str(BASE_CONFIG_PATH / relative_path)
|
||||
|
||||
|
||||
def generate_colors_from_wallpaper(image_path: str) -> bool:
|
||||
cmd = f'matugen image "{image_path}" --source-color-index 0'
|
||||
return bool(exec_shell_command_async(cmd))
|
||||
Reference in new issue
Block a user