diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-24 23:53:44 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-24 23:53:44 +1000 |
| commit | 9ed04e7a85a2a8aa812f25545df998dda2422fd5 (patch) | |
| tree | c801c602246963946a80941416b0d4e3e45511b0 /src/caelestia | |
| parent | internal: more lazy importing (diff) | |
| download | caelestia-cli-9ed04e7a85a2a8aa812f25545df998dda2422fd5.tar.gz caelestia-cli-9ed04e7a85a2a8aa812f25545df998dda2422fd5.tar.bz2 caelestia-cli-9ed04e7a85a2a8aa812f25545df998dda2422fd5.zip | |
wsaction: remove
Diffstat (limited to 'src/caelestia')
| -rw-r--r-- | src/caelestia/parser.py | 15 | ||||
| -rw-r--r-- | src/caelestia/subcommands/wsaction.py | 18 |
2 files changed, 1 insertions, 32 deletions
diff --git a/src/caelestia/parser.py b/src/caelestia/parser.py index ad0fd99..f18b7fd 100644 --- a/src/caelestia/parser.py +++ b/src/caelestia/parser.py @@ -1,6 +1,6 @@ import argparse -from caelestia.subcommands import clipboard, emoji, pip, record, scheme, screenshot, shell, toggle, wallpaper, wsaction +from caelestia.subcommands import clipboard, emoji, pip, record, scheme, screenshot, shell, toggle, wallpaper from caelestia.utils.paths import wallpapers_dir from caelestia.utils.scheme import get_scheme_names, scheme_variants from caelestia.utils.wallpaper import get_wallpaper @@ -35,19 +35,6 @@ def parse_args() -> (argparse.ArgumentParser, argparse.Namespace): "workspace", choices=["communication", "music", "sysmon", "specialws", "todo"], help="the workspace to toggle" ) - # Create parser for workspace-action opts - ws_action_parser = command_parser.add_parser( - "workspace-action", help="execute a Hyprland workspace dispatcher in the current group" - ) - ws_action_parser.set_defaults(cls=wsaction.Command) - ws_action_parser.add_argument( - "-g", "--group", action="store_true", help="whether to execute the dispatcher on a group" - ) - ws_action_parser.add_argument( - "dispatcher", choices=["workspace", "movetoworkspace"], help="the dispatcher to execute" - ) - ws_action_parser.add_argument("workspace", type=int, help="the workspace to pass to the dispatcher") - # Create parser for scheme opts scheme_parser = command_parser.add_parser("scheme", help="manage the colour scheme") scheme_command_parser = scheme_parser.add_subparsers(title="subcommands") diff --git a/src/caelestia/subcommands/wsaction.py b/src/caelestia/subcommands/wsaction.py deleted file mode 100644 index d496381..0000000 --- a/src/caelestia/subcommands/wsaction.py +++ /dev/null @@ -1,18 +0,0 @@ -from argparse import Namespace - -from caelestia.utils import hypr - - -class Command: - args: Namespace - - def __init__(self, args: Namespace) -> None: - self.args = args - - def run(self) -> None: - 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) |