feat: impl workspace-action command

This commit is contained in:
2 * r + 2 * t
2025-06-10 00:04:50 +10:00
parent 33dbeb01b3
commit 63d9381734
+8 -1
View File
@@ -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)