refactor(src/utils): adjust base path constants and add toml_file helper

This commit is contained in:
sankalp committed 2026-07-06 17:38:47 +05:45
1 parent 7fdb3be0b3
commit 965f93e418
1 file changed
+9 -1
+9 -1
View File
@@ -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))