From 63d9381734da8ea4809b9462c487810d306c383d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 10 Jun 2025 00:04:50 +1000 Subject: feat: impl workspace-action command --- src/subcommands/wsaction.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/subcommands/wsaction.py b/src/subcommands/wsaction.py index 37f9a2b..1e93cae 100644 --- a/src/subcommands/wsaction.py +++ b/src/subcommands/wsaction.py @@ -1,5 +1,7 @@ from argparse import Namespace +from utils import hypr + class Command: args: Namespace @@ -8,4 +10,9 @@ class Command: self.args = args def run(self) -> None: - pass + active_ws = hypr.message("activeworkspace")["id"] + + if self.args.group: + hypr.dispatch(self.args.dispatcher, (self.args.workspace - 1) * 10 + active_ws % 10) + else: + hypr.dispatch(self.args.dispatcher, int((active_ws - 1) / 10) * 10 + self.args.workspace) -- cgit v1.2.3-freya