feat(globalmenu) #43
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user