refactor: remove LuaHyprlandWorkspaces monkey patch

Fabric now handles Lua support natively via does_hyprland_support_lua().
Use HyprlandWorkspaces directly.
This commit is contained in:
sankalp committed 2026-07-28 10:00:00 +05:45
1 parent d6d736ac7f
commit 34de9da0d7
1 file changed
+2 -21
+2 -21
View File
@@ -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,