feat: org todos in bar

This commit is contained in:
2026-05-10 01:55:21 +02:00
parent a8d96b7481
commit 07919fc687
11 changed files with 958 additions and 235 deletions

View File

@@ -29,9 +29,11 @@ from .modules.launcher.screenshot import ScreenshotMenu
from .modules.calendar import CalendarService
from .modules.control_center import ControlCenter
from .modules.notifications import NotificationToasts
from .modules.org import OrgDropdown
from .modules.stylix import get_stylix_css_path
from .modules.vinyl import VinylButton
from .config import CALENDAR, NOTIFICATIONS, POWER, SCREENREC, STYLIX, VINYL
from .services.org import OrgService
from .config import CALENDAR, NOTIFICATIONS, ORG, POWER, SCREENREC, STYLIX, VINYL
from .services.fenster import get_i3_connection
from .services.notification_history import NotificationHistoryService
from .services.screenrec import ScreenrecService
@@ -92,6 +94,14 @@ if notification_history is not None:
width=NOTIFICATIONS.get("center_width", 380),
)
org_service: OrgService | None = None
org_dropdown: OrgDropdown | None = None
if ORG.get("enable", False):
org_service = OrgService(
update_interval=int(ORG.get("update_interval", 60_000)),
)
org_dropdown = OrgDropdown(service=org_service, monitor=0)
bar_windows = []
notmuch_widget = None
@@ -102,6 +112,8 @@ if notification_toasts is not None:
_app_windows.append(notification_toasts)
if control_center is not None:
_app_windows.append(control_center)
if org_dropdown is not None:
_app_windows.append(org_dropdown)
app = Application("sims", *_app_windows)
@@ -229,6 +241,8 @@ def spawn_bars():
monitor=i,
screenrec_service=screenrec_service if i == 0 else None,
control_center=control_center if i == 0 else None,
org_service=org_service,
org_dropdown=org_dropdown if i == 0 else None,
)
bar_windows.append(bar)
if i == 0 and bar.notmuch: