feat: impl screenshot command

This commit is contained in:
2 * r + 2 * t
2025-06-13 00:42:46 +10:00
parent 558a086bcd
commit 796d538b16
4 changed files with 74 additions and 14 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ def parse_args() -> (argparse.ArgumentParser, argparse.Namespace):
# Create parser for screenshot opts
screenshot_parser = command_parser.add_parser("screenshot", help="take a screenshot")
screenshot_parser.set_defaults(cls=screenshot.Command)
screenshot_parser.add_argument("-r", "--region", help="take a screenshot of a region")
screenshot_parser.add_argument("-r", "--region", nargs="?", const="slurp", help="take a screenshot of a region")
screenshot_parser.add_argument(
"-f", "--freeze", action="store_true", help="freeze the screen while selecting a region"
)