mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-06 15:29:28 -05:00
wsaction: remove
This commit is contained in:
+1
-14
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user