Add explicit pyproject.toml with project metadata, dependency groups, and uv lock configuration. - New Features - Introduce pyproject.toml defining package name, version, description, and runtime dependencies. - Declare dependencies in a structured list and development groups. - Enhancements - Consolidate and clean up imports in lock.py and main.py. - Replace hard‑coded logger disable entries with targeted fabric module names. - Streamline Application initialization by removing unused components. - Bug Fixes - Resolve missing imports that caused NameError. - Correct import ordering for static analysis compliance. - Align dependency versions with uv.lock for reproducibility.
61 lines
1.4 KiB
Python
61 lines
1.4 KiB
Python
from fabric import Application
|
|
from fabric.utils import get_relative_path, logger, monitor_file
|
|
|
|
from config.data import APP_NAME
|
|
|
|
# from modules.notification.notification import ModusNoti
|
|
from modules.panel.main import Panel
|
|
from utils.functions import set_process_name
|
|
|
|
# from modules.desktop.widget import Deskwidgets
|
|
|
|
|
|
for log in [
|
|
"fabric.hyprland.widgets",
|
|
"fabric.audio.service",
|
|
"fabric.bluetooth.service",
|
|
"services.network",
|
|
"utils.wayland",
|
|
]:
|
|
logger.disable(log)
|
|
|
|
if __name__ == "__main__":
|
|
set_process_name(APP_NAME)
|
|
|
|
# Load configuration
|
|
from config.data import load_config
|
|
|
|
# About().toggle(None)
|
|
config = load_config()
|
|
|
|
panel = Panel()
|
|
# modusnoti = ModusNoti()
|
|
# deskwidget = Deskwidgets() # Use minimal version for 2-3 MB usage
|
|
|
|
# Set corners visibility based on config
|
|
# corners_visible = config.get("corners_visible", True)
|
|
# corners.set_visible(corners_visible)
|
|
|
|
# Monitor CSS files for changes
|
|
css_file = monitor_file(get_relative_path("styles"))
|
|
_ = css_file.connect("changed", lambda *_: set_css())
|
|
|
|
# Make sure corners is added to the app
|
|
app = Application(
|
|
f"{APP_NAME}",
|
|
panel,
|
|
# modusnoti,
|
|
# deskwidget,
|
|
)
|
|
|
|
def set_css():
|
|
app.set_stylesheet_from_file(
|
|
get_relative_path("main.css"),
|
|
)
|
|
|
|
app.set_css = set_css
|
|
|
|
app.set_css()
|
|
|
|
app.run()
|