refactor(src/window): replace get_relative_path with toml_file for config path resolution
The imports now use toml_file to load dock.toml and launcher.toml directly, removing the get_relative_path utility and simplifying path handling. This reduces indirect dependencies and clarifies configuration loading.
This commit is contained in:
2 files changed
+4
-5
No files matched your search
+2
-3
@@ -15,7 +15,6 @@ from fabric.utils import (
|
||||
Gtk,
|
||||
exec_shell_command_async,
|
||||
get_desktop_applications,
|
||||
get_relative_path,
|
||||
logger,
|
||||
os,
|
||||
random,
|
||||
@@ -30,10 +29,10 @@ from services.modus import modus_service
|
||||
from utils.functions import is_special_workspace_id
|
||||
from utils.icon_resolver import IconResolver
|
||||
from utils.occlusion import check_occlusion
|
||||
from utils.utils import svg_file
|
||||
from utils.utils import svg_file, toml_file
|
||||
|
||||
# pinned apps config file path
|
||||
PINNED_APPS_FILE = get_relative_path("../../config/dock.toml")
|
||||
PINNED_APPS_FILE = toml_file("dock.toml")
|
||||
|
||||
# Animation
|
||||
LERP_FACTOR = 0.20 # per-frame interpolation speed (0–1)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
from typing import Any, Dict, List
|
||||
|
||||
import tomlkit
|
||||
from fabric.utils import get_relative_path
|
||||
from utils.utils import toml_file
|
||||
|
||||
|
||||
class TriggerConfig:
|
||||
def __init__(self, config_path: str = None):
|
||||
if config_path is None:
|
||||
config_path = get_relative_path("../../../config/launcher.toml")
|
||||
config_path = toml_file("launcher.toml")
|
||||
|
||||
self.config_path = config_path
|
||||
|
||||
|
||||
Reference in new issue
Block a user