refactor(config): reorganize config.toml into sections
- Move all settings into [general], [dock], [panel], [switcher], [notification] - Remove [desktop_widgets] section, move items to panel/general - Add dot notation support to config service for nested keys - Update all config references across codebase
This commit is contained in:
17 files changed
+204
-148
No files matched your search
@@ -372,7 +372,9 @@ class Weather(Service):
|
||||
self.emit("ready")
|
||||
|
||||
def _on_config_changed(self, new_config: dict, old_config: dict) -> None:
|
||||
if new_config.get("weather_location") != old_config.get("weather_location"):
|
||||
new_general = new_config.get("general", {})
|
||||
old_general = old_config.get("general", {})
|
||||
if new_general.get("weather_location") != old_general.get("weather_location"):
|
||||
self.refresh()
|
||||
|
||||
def _start_fetch_thread(self) -> None:
|
||||
@@ -387,7 +389,7 @@ class Weather(Service):
|
||||
|
||||
from services.config import config
|
||||
|
||||
target_loc = config().get("weather_location", "").strip()
|
||||
target_loc = config().get("general.weather_location", "").strip()
|
||||
|
||||
# Invalidate location cache if the config target changed
|
||||
if location_data and location_data.get("config_location", "") != target_loc:
|
||||
|
||||
Reference in new issue
Block a user