diff --git a/bar/river/generated/river_control_unstable_v1/zriver_command_callback_v1.py b/bar/river/generated/river_control_unstable_v1/zriver_command_callback_v1.py index 0670e6f..a6c264d 100644 --- a/bar/river/generated/river_control_unstable_v1/zriver_command_callback_v1.py +++ b/bar/river/generated/river_control_unstable_v1/zriver_command_callback_v1.py @@ -16,14 +16,8 @@ from __future__ import annotations -from pywayland.protocol_core import ( - Argument, - ArgumentType, - Global, - Interface, - Proxy, - Resource, -) +from pywayland.protocol_core import (Argument, ArgumentType, Global, Interface, + Proxy, Resource) class ZriverCommandCallbackV1(Interface): diff --git a/bar/river/generated/river_control_unstable_v1/zriver_control_v1.py b/bar/river/generated/river_control_unstable_v1/zriver_control_v1.py index 01a68f5..23d0f2e 100644 --- a/bar/river/generated/river_control_unstable_v1/zriver_control_v1.py +++ b/bar/river/generated/river_control_unstable_v1/zriver_control_v1.py @@ -16,14 +16,8 @@ from __future__ import annotations -from pywayland.protocol_core import ( - Argument, - ArgumentType, - Global, - Interface, - Proxy, - Resource, -) +from pywayland.protocol_core import (Argument, ArgumentType, Global, Interface, + Proxy, Resource) from ..wayland import WlSeat from .zriver_command_callback_v1 import ZriverCommandCallbackV1 diff --git a/bar/river/generated/river_status_unstable_v1/zriver_output_status_v1.py b/bar/river/generated/river_status_unstable_v1/zriver_output_status_v1.py index 1ddb246..6cc53ce 100644 --- a/bar/river/generated/river_status_unstable_v1/zriver_output_status_v1.py +++ b/bar/river/generated/river_status_unstable_v1/zriver_output_status_v1.py @@ -16,14 +16,8 @@ from __future__ import annotations -from pywayland.protocol_core import ( - Argument, - ArgumentType, - Global, - Interface, - Proxy, - Resource, -) +from pywayland.protocol_core import (Argument, ArgumentType, Global, Interface, + Proxy, Resource) class ZriverOutputStatusV1(Interface): diff --git a/bar/river/generated/river_status_unstable_v1/zriver_seat_status_v1.py b/bar/river/generated/river_status_unstable_v1/zriver_seat_status_v1.py index cdee534..2931b80 100644 --- a/bar/river/generated/river_status_unstable_v1/zriver_seat_status_v1.py +++ b/bar/river/generated/river_status_unstable_v1/zriver_seat_status_v1.py @@ -16,16 +16,9 @@ from __future__ import annotations -from pywayland.protocol_core import ( - Argument, - ArgumentType, - Global, - Interface, - Proxy, - Resource, -) - from pywayland.protocol.wayland import WlOutput +from pywayland.protocol_core import (Argument, ArgumentType, Global, Interface, + Proxy, Resource) class ZriverSeatStatusV1(Interface): diff --git a/bar/river/generated/river_status_unstable_v1/zriver_status_manager_v1.py b/bar/river/generated/river_status_unstable_v1/zriver_status_manager_v1.py index ee39d68..076450b 100644 --- a/bar/river/generated/river_status_unstable_v1/zriver_status_manager_v1.py +++ b/bar/river/generated/river_status_unstable_v1/zriver_status_manager_v1.py @@ -16,17 +16,10 @@ from __future__ import annotations -from pywayland.protocol_core import ( - Argument, - ArgumentType, - Global, - Interface, - Proxy, - Resource, -) +from pywayland.protocol.wayland import WlOutput, WlSeat +from pywayland.protocol_core import (Argument, ArgumentType, Global, Interface, + Proxy, Resource) -from pywayland.protocol.wayland import WlOutput -from pywayland.protocol.wayland import WlSeat from .zriver_output_status_v1 import ZriverOutputStatusV1 from .zriver_seat_status_v1 import ZriverSeatStatusV1 diff --git a/bar/river/service.py b/bar/river/service.py index 2723851..beb2d8a 100644 --- a/bar/river/service.py +++ b/bar/river/service.py @@ -1,21 +1,18 @@ import os -import threading import time -from loguru import logger from dataclasses import dataclass, field -from typing import Dict, List, Optional, Any, Set +from typing import Any, Dict, List, Optional, Set -from fabric.core.service import Service, Signal, Property +from fabric.core.service import Property, Service, Signal from fabric.utils.helpers import idle_add - +from gi.repository import GLib +from loguru import logger # Import pywayland components - ensure these imports are correct from pywayland.client import Display from pywayland.protocol.wayland import WlOutput, WlSeat + +from .generated.river_control_unstable_v1 import ZriverControlV1 from .generated.river_status_unstable_v1 import ZriverStatusManagerV1 -from gi.repository import ( - Gio, - GLib, -) @dataclass @@ -103,7 +100,6 @@ class River(Service): "seat_status": None, } - # Set up registry handlers - using more direct approach like your example def handle_global(registry, name, iface, version): logger.debug( f"[RiverService] Global: {iface} (v{version}, name={name})" diff --git a/bar/river/widgets.py b/bar/river/widgets.py index 87b7de1..ca95e8d 100644 --- a/bar/river/widgets.py +++ b/bar/river/widgets.py @@ -1,14 +1,13 @@ -from loguru import logger from fabric.core.service import Property -from fabric.widgets.button import Button +from fabric.utils.helpers import bulk_connect from fabric.widgets.box import Box +from fabric.widgets.button import Button from fabric.widgets.eventbox import EventBox from fabric.widgets.label import Label -from fabric.utils.helpers import bulk_connect -from .service import River - - from gi.repository import Gdk +from loguru import logger + +from .service import River _connection: River | None = None