wsaction: remove

This commit is contained in:
2 * r + 2 * t
2025-06-24 23:53:44 +10:00
parent f47b4fe661
commit 9ed04e7a85
3 changed files with 2 additions and 38 deletions
+1 -6
View File
@@ -1,7 +1,7 @@
set -l seen '__fish_seen_subcommand_from'
set -l has_opt '__fish_contains_opt'
set -l commands shell toggle workspace-action scheme screenshot record clipboard emoji-picker wallpaper pip
set -l commands shell toggle scheme screenshot record clipboard emoji-picker wallpaper pip
set -l not_seen "not $seen $commands"
# Disable file completions
@@ -13,7 +13,6 @@ complete -c caelestia -s 'h' -l 'help' -d 'Show help'
# Subcommands
complete -c caelestia -n $not_seen -a 'shell' -d 'Start the shell or message it'
complete -c caelestia -n $not_seen -a 'toggle' -d 'Toggle a special workspace'
complete -c caelestia -n $not_seen -a 'workspace-action' -d 'Exec a dispatcher in the current group'
complete -c caelestia -n $not_seen -a 'scheme' -d 'Manage the colour scheme'
complete -c caelestia -n $not_seen -a 'screenshot' -d 'Take a screenshot'
complete -c caelestia -n $not_seen -a 'record' -d 'Start a screen recording'
@@ -75,10 +74,6 @@ complete -c caelestia -n "$seen shell && $seen notifs && not $seen clear" -a 'cl
set -l commands communication music specialws sysmon todo
complete -c caelestia -n "$seen toggle && not $seen drawers && not $seen $commands" -a "$commands" -d 'toggle'
# Workspace action
set -l commands workspace workspacegroup movetoworkspace movetoworkspacegroup
complete -c caelestia -n "$seen workspace-action && not $seen $commands" -a "$commands" -d 'action'
# Scheme
set -l commands list get set
set -l not_seen "$seen scheme && not $seen $commands"
+1 -14
View File
@@ -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")
-18
View File
@@ -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)