refactor: remove LuaHyprlandWorkspaces monkey patch
Fabric now handles Lua support natively via does_hyprland_support_lua(). Use HyprlandWorkspaces directly.
This commit is contained in:
1 file changed
+2
-21
@@ -9,25 +9,6 @@ from utils.gtk_utils import setup_cursor_hover
|
|||||||
# TODO: Support multi-monitor setups
|
# 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):
|
class WorkspaceIndicator(Box):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
Box.__init__(
|
Box.__init__(
|
||||||
@@ -36,7 +17,7 @@ class WorkspaceIndicator(Box):
|
|||||||
self._current_config = {"hide_special_workspace": True}
|
self._current_config = {"hide_special_workspace": True}
|
||||||
on_config_change(self._on_config_changed)
|
on_config_change(self._on_config_changed)
|
||||||
|
|
||||||
self.workspaces = LuaHyprlandWorkspaces(
|
self.workspaces = HyprlandWorkspaces(
|
||||||
name="workspaces",
|
name="workspaces",
|
||||||
spacing=4,
|
spacing=4,
|
||||||
buttons_factory=self._get_button_factory(),
|
buttons_factory=self._get_button_factory(),
|
||||||
@@ -92,7 +73,7 @@ class WorkspaceIndicator(Box):
|
|||||||
if hasattr(self, "workspaces") and self.workspaces:
|
if hasattr(self, "workspaces") and self.workspaces:
|
||||||
self.workspaces.destroy()
|
self.workspaces.destroy()
|
||||||
|
|
||||||
self.workspaces = LuaHyprlandWorkspaces(
|
self.workspaces = HyprlandWorkspaces(
|
||||||
name="workspaces",
|
name="workspaces",
|
||||||
spacing=4,
|
spacing=4,
|
||||||
buttons_factory=button_factory,
|
buttons_factory=button_factory,
|
||||||
|
|||||||
Reference in new issue
Block a user