Rewrite #30

Merged
S4NKALP merged 506 commits from dev into macos 2026-07-18 16:11:08 +00:00
Showing only changes of commit 023d0be7c8 - Show all commits
+19 -20
View File
@@ -20,24 +20,23 @@ from window.osd.main import OSDWindow
from window.panel.main import Panel
from window.switcher import ApplicationSwitcher
class LazyLauncher:
def __init__(self):
self._instance = None
def _get_instance(self):
if self._instance is None:
from window.launcher.main import Launcher
self._instance = Launcher()
import __main__
if hasattr(__main__, "app") and __main__.app:
__main__.app.add_window(self._instance)
return self._instance
def __getattr__(self, name):
return getattr(self._get_instance(), name)
# class LazyLauncher:
# def __init__(self):
# self._instance = None
#
# def _get_instance(self):
# if self._instance is None:
# from window.launcher.main import Launcher
#
# self._instance = Launcher()
# import __main__
#
# if hasattr(__main__, "app") and __main__.app:
# __main__.app.add_window(self._instance)
# return self._instance
#
# def __getattr__(self, name):
# return getattr(self._get_instance(), name)
def main():
@@ -57,7 +56,7 @@ def main():
switcher = ApplicationSwitcher()
panel = Panel()
modusnoti = ModusNoti()
launcher = LazyLauncher()
# launcher = LazyLauncher()
deskwidget = Deskwidgets()
dock = Dock()
osd = OSDWindow()
@@ -95,7 +94,7 @@ def main():
__main__.switcher = switcher
__main__.panel = panel
__main__.modusnoti = modusnoti
__main__.launcher = launcher
# __main__.launcher = launcher
__main__.deskwidget = deskwidget
__main__.dock = dock
__main__.osd = osd