feat(root): implement dynamic todo list refresh and UI enhancements

This change adds a mechanism to refresh the todo list dynamically when the underlying service updates, improving UI responsiveness and user experience. It also updates documentation and removes deprecated files.

- New Features:
  - Added `_refresh_todos` method to rebuild the todo list when `get_todo_service().todos` changes.
  - Introduced `TodoListCapture` class for mouse capture handling of the todo list window.
- Enhancements:
  - Updated README with corrected image paths, installation tips, and manual installation commands.
  - Introduced `start.py` to launch the application or lock mode.
  - Removed deprecated `config.json` and `debug_memory.py`.
- Bug Fixes:
  - Fixed lock screen screenshot path in README.
This commit is contained in:
sankalp committed 2026-04-10 17:11:32 +05:45
1 parent 235f53b6a2
commit e4813f35a0
267 files changed
+24582 -394

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
import os
from fabric import Application
from fabric.utils import get_relative_path, logger, monitor_file
from shared.data import APP_NAME, load_config
from utils.functions import set_process_name
from window.desktop.widget import Deskwidgets
from window.dock import Dock
from window.launcher.main import Launcher
from window.notification.notification import ModusNoti
from window.osd.main import OSDWindow
from window.panel.main import Panel
from window.switcher import ApplicationSwitcher
for log in [
"fabric",
"services",
"window",
"utils",
]:
logger.disable(log)
def main():
# Generate colors.css if it doesn't exist
colors_css_path = get_relative_path("shared/styles/colors.css")
if not os.path.exists(colors_css_path):
from utils.utils import generate_colors_from_wallpaper
default_wallpaper = get_relative_path("assets/wallpaper_example/example-1.png")
if os.path.exists(default_wallpaper):
generate_colors_from_wallpaper(default_wallpaper)
set_process_name(APP_NAME)
load_config()
switcher = ApplicationSwitcher()
panel = Panel()
modusnoti = ModusNoti()
launcher = Launcher()
deskwidget = Deskwidgets()
dock = Dock()
osd = OSDWindow()
# Monitor CSS files for changes
css_file = monitor_file(get_relative_path("shared/styles"))
_ = css_file.connect("changed", lambda *_: set_css())
app = Application(
f"{APP_NAME}",
panel,
modusnoti,
deskwidget.top_left,
deskwidget.bottom_left,
osd,
launcher,
switcher,
dock,
)
def set_css():
app.set_stylesheet_from_file(
get_relative_path("shared/styles/main.css"),
)
app.set_css = set_css
app.set_css()
app.run()
if __name__ == "__main__":
main()