diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-10 00:04:50 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-10 00:04:50 +1000 |
| commit | 63d9381734da8ea4809b9462c487810d306c383d (patch) | |
| tree | a0bff2d945186c975dc9a2badfe4f36d3a835695 /src/subcommands/wsaction.py | |
| parent | feat: add toggle command (diff) | |
| download | caelestia-cli-63d9381734da8ea4809b9462c487810d306c383d.tar.gz caelestia-cli-63d9381734da8ea4809b9462c487810d306c383d.tar.bz2 caelestia-cli-63d9381734da8ea4809b9462c487810d306c383d.zip | |
feat: impl workspace-action command
Diffstat (limited to 'src/subcommands/wsaction.py')
| -rw-r--r-- | src/subcommands/wsaction.py | 9 |
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) |