forked from Shinonome/caelestia-cli
feat: impl workspace-action command
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
from argparse import Namespace
|
from argparse import Namespace
|
||||||
|
|
||||||
|
from utils import hypr
|
||||||
|
|
||||||
|
|
||||||
class Command:
|
class Command:
|
||||||
args: Namespace
|
args: Namespace
|
||||||
@@ -8,4 +10,9 @@ class Command:
|
|||||||
self.args = args
|
self.args = args
|
||||||
|
|
||||||
def run(self) -> None:
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user