From 34de9da0d75543ae1279a239b164b8f01ad8e475 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 28 Jul 2026 10:00:00 +0545 Subject: [PATCH] refactor: remove LuaHyprlandWorkspaces monkey patch Fabric now handles Lua support natively via does_hyprland_support_lua(). Use HyprlandWorkspaces directly. --- src/window/panel/components/workspace.py | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/window/panel/components/workspace.py b/src/window/panel/components/workspace.py index 791efc6..0ced7da 100644 --- a/src/window/panel/components/workspace.py +++ b/src/window/panel/components/workspace.py @@ -9,25 +9,6 @@ from utils.gtk_utils import setup_cursor_hover # TODO: Support multi-monitor setups -class LuaHyprlandWorkspaces(HyprlandWorkspaces): - def do_action_next(self): - ws = "e" if not self._empty_scroll else "" - return self.connection.send_command( - f"batch/dispatch hl.dsp.focus({{workspace=[[{ws}+1]]}})" - ) - - def do_action_previous(self): - ws = "e" if not self._empty_scroll else "" - return self.connection.send_command( - f"batch/dispatch hl.dsp.focus({{workspace=[[{ws}-1]]}})" - ) - - def do_button_clicked(self, button: WorkspaceButton): - return self.connection.send_command( - f"batch/dispatch hl.dsp.focus({{workspace=[[{button.id}]]}})" - ) - - class WorkspaceIndicator(Box): def __init__(self, **kwargs): Box.__init__( @@ -36,7 +17,7 @@ class WorkspaceIndicator(Box): self._current_config = {"hide_special_workspace": True} on_config_change(self._on_config_changed) - self.workspaces = LuaHyprlandWorkspaces( + self.workspaces = HyprlandWorkspaces( name="workspaces", spacing=4, buttons_factory=self._get_button_factory(), @@ -92,7 +73,7 @@ class WorkspaceIndicator(Box): if hasattr(self, "workspaces") and self.workspaces: self.workspaces.destroy() - self.workspaces = LuaHyprlandWorkspaces( + self.workspaces = HyprlandWorkspaces( name="workspaces", spacing=4, buttons_factory=button_factory,