Rewrite #30

Merged
S4NKALP merged 506 commits from dev into macos 2026-07-18 16:11:08 +00:00
2 changed files with 41 additions and 12 deletions
Showing only changes of commit 2a81a27ace - Show all commits

No files matched your search

+20 -10
View File
@@ -163,7 +163,7 @@ class GlobalMenuDropdowns:
[
dropdown_option(
"Enter Full Screen",
on_click="hyprctl dispatch fullscreen",
on_click="hyprctl dispatch 'hl.dsp.fullscreen()'",
),
],
)
@@ -184,25 +184,35 @@ class GlobalMenuDropdowns:
dropdown_divider("---------------------"),
dropdown_option(
"Move Window to Left",
on_click="hyprctl dispatch movewindow l",
on_click="hyprctl dispatch 'hl.dsp.movewindow([[l]])'",
),
dropdown_option(
"Move Window to Right",
on_click="hyprctl dispatch movewindow r",
on_click="hyprctl dispatch 'hl.dsp.movewindow([[r]])'",
),
dropdown_option(
"Cycle Through Windows",
on_click="hyprctl dispatch cyclenext",
on_click="hyprctl dispatch 'hl.dsp.cyclenext()'",
),
dropdown_divider("---------------------"),
dropdown_option("Float", on_click="hyprctl dispatch togglefloating"),
dropdown_option("Quit", on_click="hyprctl dispatch killactive"),
dropdown_option("Pseudo", on_click="hyprctl dispatch pseudo"),
dropdown_option(
"Toggle Split", on_click="hyprctl dispatch togglesplit"
"Float", on_click="hyprctl dispatch 'hl.dsp.togglefloating()'"
),
dropdown_option(
"Quit", on_click="hyprctl dispatch 'hl.dsp.killactive()'"
),
dropdown_option(
"Pseudo", on_click="hyprctl dispatch 'hl.dsp.pseudo()'"
),
dropdown_option(
"Toggle Split", on_click="hyprctl dispatch 'hl.dsp.togglesplit()'"
),
dropdown_option(
"Center", on_click="hyprctl dispatch 'hl.dsp.centerwindow()'"
),
dropdown_option(
"Group", on_click="hyprctl dispatch 'hl.dsp.togglegroup()'"
),
dropdown_option("Center", on_click="hyprctl dispatch centerwindow"),
dropdown_option("Group", on_click="hyprctl dispatch togglegroup"),
dropdown_option(
"Pin",
on_clicked=lambda _: exec_shell_command_async(
+21 -2
View File
@@ -8,6 +8,25 @@ from utils.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__(
@@ -16,7 +35,7 @@ class WorkspaceIndicator(Box):
self._current_config = {"hide_special_workspace": True}
on_config_change(self._on_config_changed)
self.workspaces = HyprlandWorkspaces(
self.workspaces = LuaHyprlandWorkspaces(
name="workspaces",
spacing=4,
buttons_factory=self._get_button_factory(),
@@ -72,7 +91,7 @@ class WorkspaceIndicator(Box):
if hasattr(self, "workspaces") and self.workspaces:
self.workspaces.destroy()
self.workspaces = HyprlandWorkspaces(
self.workspaces = LuaHyprlandWorkspaces(
name="workspaces",
spacing=4,
buttons_factory=button_factory,