Skip to content

Commit 83c1763

Browse files
committed
version 0.1.3 - fix matugenv4 breaking changes, and create updater.py with Glaze
1 parent 2ab4ee6 commit 83c1763

8 files changed

Lines changed: 726 additions & 446 deletions

File tree

.coverage

0 Bytes
Binary file not shown.

main.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import sys
23

34
import gi
45

@@ -14,7 +15,7 @@
1415
from modules.dock import Dock
1516
from modules.notch import Notch
1617
from modules.notifications import NotificationPopup
17-
from modules.updater import run_updater
18+
import subprocess as _sp
1819

1920
fonts_updated_file = f"{CACHE_DIR}/fonts_updated"
2021

@@ -37,9 +38,18 @@
3738

3839
config = load_config()
3940

40-
GLib.idle_add(run_updater)
41-
# Every hour
42-
GLib.timeout_add(3600000, run_updater)
41+
def _launch_updater(force=False):
42+
"""Launch the PySide6 updater in a separate process."""
43+
cmd = [sys.executable, "-m", "modules.updater"]
44+
if force:
45+
cmd.append("--force")
46+
try:
47+
_sp.Popen(cmd, cwd=os.path.dirname(os.path.abspath(__file__)))
48+
except Exception as e:
49+
print(f"Error launching updater: {e}")
50+
51+
GLib.idle_add(_launch_updater)
52+
GLib.timeout_add(3600000, _launch_updater)
4353

4454
# Initialize multi-monitor services
4555
try:

modules/launcher.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import os
55
import re
66
import subprocess
7+
import sys
8+
from pathlib import Path
79
from collections.abc import Iterator
810

911
import numpy as np
@@ -21,7 +23,7 @@
2123
import config.data as data
2224
import modules.icons as icons
2325
from modules.dock import Dock
24-
from modules.updater import run_updater
26+
import subprocess as _sp
2527
from utils.conversion import Conversion
2628

2729
tooltip_settings = f"<b>Open {data.APP_NAME_CAP} Settings</b>"
@@ -355,7 +357,10 @@ def on_search_entry_activate(self, text):
355357
case ":p":
356358
self.notch.open_notch("power")
357359
case ":update":
358-
GLib.idle_add(lambda: run_updater(force=True))
360+
_sp.Popen(
361+
[sys.executable, "-m", "modules.updater", "--force"],
362+
cwd=str(Path(__file__).resolve().parent.parent),
363+
)
359364
case ":settings":
360365
exec_shell_command_async(f"python {data.HOME_DIR}/.config/{data.APP_NAME}/config/config.py")
361366
self.close_launcher()

0 commit comments

Comments
 (0)