summaryrefslogtreecommitdiff
path: root/src/caelestia/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/caelestia/parser.py')
-rw-r--r--src/caelestia/parser.py25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/caelestia/parser.py b/src/caelestia/parser.py
index 838a608..311b782 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
+from caelestia.subcommands import clipboard, emoji, record, resizer, 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
@@ -106,9 +106,24 @@ def parse_args() -> (argparse.ArgumentParser, argparse.Namespace):
help="do not automatically change the scheme mode based on wallpaper colour",
)
- # Create parser for pip opts
- pip_parser = command_parser.add_parser("pip", help="picture in picture utilities")
- pip_parser.set_defaults(cls=pip.Command)
- pip_parser.add_argument("-d", "--daemon", action="store_true", help="start the daemon")
+ # Create parser for resizer opts
+ resizer_parser = command_parser.add_parser("resizer", help="window resizer daemon")
+ resizer_parser.set_defaults(cls=resizer.Command)
+ resizer_parser.add_argument("-d", "--daemon", action="store_true", help="start the resizer daemon")
+ resizer_parser.add_argument(
+ "pattern",
+ nargs="?",
+ help="pattern to match against windows ('active' for current window only, 'pip' for quick pip mode)",
+ )
+ resizer_parser.add_argument(
+ "match_type",
+ nargs="?",
+ metavar="match_type",
+ choices=["titleContains", "titleExact", "titleRegex", "initialTitle"],
+ help="type of pattern matching (titleContains,titleExact,titleRegex,initialTitle)",
+ )
+ resizer_parser.add_argument("width", nargs="?", help="width to resize to")
+ resizer_parser.add_argument("height", nargs="?", help="height to resize to")
+ resizer_parser.add_argument("actions", nargs="?", help="comma-separated actions to apply (float,center,pip)")
return parser, parser.parse_args()