Files
Modus/utils/roam.py
T
sankalp 1ed576f222 feat(utils): add dbus helper and extend utility functions
The changes introduce a new GioDBusHelper class for D-Bus interactions and expand utils/functions.py with utilities for timeout parsing, cursor hover handling, animated scale widgets, and SVG loading, improving functionality and maintainability.

- New Features
  - Add GioDBusHelper for method calls and signal subscription.
- Enhancements
  - Add parse_timeout_string and replace placeholder set_process_name implementation.
  - Implement AnimatedScale widget and related utilities.
  - Provide svg_file helper with dynamic style updates.
- Bug Fixes
  - None
2026-02-26 06:24:22 +05:45

46 lines
1.1 KiB
Python

from fabric.audio import Audio
from fabric.utils import logger
from services.modus import (
ModusService,
)
from services.modus import (
notification_service as notification_service_instance,
)
global modus_service
try:
modus_service = ModusService()
except Exception as e:
logger.error(f"[Main] Failed to create ModusService: {e}")
modus_service = None
if modus_service is None:
logger.warning(
"[Main] ModusService was not initialized. Functionality may be limited."
)
global notification_service
try:
notification_service = notification_service_instance
except Exception as e:
logger.error(f"[Main] Failed to create NotificationService: {e}")
notification_service = None
if notification_service is None:
logger.warning(
"[Main] NotificationService was not initialized. Notifications may not work."
)
global audio_service
try:
audio_service = Audio()
except Exception as e:
logger.error(f"[Main] Failed to create AudioService: {e}")
audio_service = None
if audio_service is None:
logger.warning(
"[Main] AudioService was not initialized. Audio features may not work."
)