summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/subcommands/wsaction.py9
1 files changed, 8 insertions, 1 deletions
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)