Created a settings > path_manager class and cleaned up srtting manager class

This commit is contained in:
2026-01-03 23:28:14 -06:00
parent 90b2f050c6
commit 48182f9775
12 changed files with 183 additions and 145 deletions

View File

@@ -66,7 +66,7 @@ class KeyMapper:
def load_map(self):
self.states = copy.deepcopy(self._map)
bindings_file = f"{settings_manager.get_home_config_path()}/code-key-bindings.json"
bindings_file = f"{settings_manager.path_manager.get_home_config_path()}/code-key-bindings.json"
with open(bindings_file, 'r') as f:
data = json.load(f)["keybindings"]

View File

@@ -98,7 +98,7 @@ class SourceView(GtkSource.View, ObservableMixin, SourceViewEventsMixin, SourceV
self.completion.set_completer( self.get_completion() )
self.style_scheme_manager.append_search_path(
f"{settings_manager.get_home_config_path()}/code_styles"
f"{settings_manager.path_manager.get_home_config_path()}/code_styles"
)
self.syntax_theme = self.style_scheme_manager.get_scheme(
f"{settings_manager.settings.theming.syntax_theme}"

View File

@@ -61,7 +61,7 @@ class VteWidget(Vte.Terminal):
def _do_session_spawn(self):
self.spawn_sync(
Vte.PtyFlags.DEFAULT,
settings_manager.get_home_path(),
settings_manager.path_manager.get_home_path(),
["/bin/bash"],
[],
GLib.SpawnFlags.DEFAULT,
@@ -76,8 +76,8 @@ class VteWidget(Vte.Terminal):
"export LC_ALL=C\n",
"export XDG_RUNTIME_DIR='/run/user/1000'\n",
"export DISPLAY=:0\n",
f"export XAUTHORITY='{settings_manager.get_home_path()}/.Xauthority'\n",
f"\nexport HOME='{settings_manager.get_home_path()}'\n",
f"export XAUTHORITY='{settings_manager.path_manager.get_home_path()}/.Xauthority'\n",
f"\nexport HOME='{settings_manager.path_manager.get_home_path()}'\n",
"export PS1='\\h@\\u \\W -->: '\n",
"clear\n"
]

View File

@@ -37,7 +37,7 @@ class WebkitUI(WebKit2.WebView):
self.set_settings( WebkitUISettings() )
def _load_view(self):
path = settings_manager.get_context_path()
path = settings_manager.path_manager.get_context_path()
data = None
with open(f"{path}/index.html", "r") as f: