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

+83
View File
@@ -0,0 +1,83 @@
from fabric.widgets.box import Box
from fabric.widgets.revealer import Revealer
from fabric.widgets.wayland import WaylandWindow as Window
from .components import (
AudioOSDContainer,
BrightnessOSDContainer,
MicrophoneOSDContainer,
CapsLockOSDContainer,
KeyboardLayoutOSDContainer,
)
class OSD(Box):
def __init__(self, window: Window, **kwargs):
super().__init__(name="osd", **kwargs)
self.window = window
self.revealer = Revealer(
transition_type="slide-up",
transition_duration=100,
child_revealed=False,
)
self.children = [self.revealer]
self.containers = {
"audio": AudioOSDContainer(window),
"brightness": BrightnessOSDContainer(window),
"microphone": MicrophoneOSDContainer(window),
"capslock": CapsLockOSDContainer(window),
"kb_layout": KeyboardLayoutOSDContainer(window),
}
# Set the OSD reference in containers
for container in self.containers.values():
container.osd = self
self.current_container = None
def show_container(self, container):
if self.current_container != container:
self.revealer.children = [container]
self.current_container = container
self.revealer.set_reveal_child(True)
def show_audio_osd(self):
self.show_container(self.containers.get("audio"))
def show_brightness_osd(self):
self.show_container(self.containers.get("brightness"))
def show_microphone_osd(self):
self.show_container(self.containers.get("microphone"))
def show_capslock_osd(self):
self.show_container(self.containers.get("capslock"))
def show_kb_layout_osd(self):
self.show_container(self.containers.get("kb_layout"))
class OSDWindow(Window):
def __init__(self, **kwargs):
super().__init__(
name="osd-window",
title="modus-osd",
anchor="bottom",
margin="0px 0px 40px 0px",
visible=False,
all_visible=False,
pass_through=True,
layer="overlay",
**kwargs,
)
self.osd = OSD(window=self)
self.add(self.osd)
if __name__ == "__main__":
from fabric import Application
osd_window = OSDWindow()
app = Application("modus-osd", osd_window)
app.run()