proper color scheme preview to avoid watcher creation spam
C++ / fmt (pull_request) Successful in 6s
JS/TS / fmt (pull_request) Successful in 19s
JS/TS / lint (pull_request) Successful in 21s
Python / static (pull_request) Successful in 53s
Rust / fmt (pull_request) Successful in 47s
C++ / build (pull_request) Successful in 1m54s
Rust / build (pull_request) Successful in 2m7s
Rust / clippy (pull_request) Successful in 1m31s
Python / verify (pull_request) Successful in 2m57s
C++ / clang-tidy (pull_request) Successful in 3m49s
C++ / fmt (pull_request) Successful in 6s
JS/TS / fmt (pull_request) Successful in 19s
JS/TS / lint (pull_request) Successful in 21s
Python / static (pull_request) Successful in 53s
Rust / fmt (pull_request) Successful in 47s
C++ / build (pull_request) Successful in 1m54s
Rust / build (pull_request) Successful in 2m7s
Rust / clippy (pull_request) Successful in 1m31s
Python / verify (pull_request) Successful in 2m57s
C++ / clang-tidy (pull_request) Successful in 3m49s
This commit is contained in:
@@ -116,10 +116,15 @@ def list_presets(
|
||||
@app.command()
|
||||
def generate(
|
||||
image_path: Path | None = typer.Option(
|
||||
None, help="Path to source image. Required for image mode."
|
||||
None,
|
||||
"--image-path",
|
||||
"-i",
|
||||
help="Path to source image. Required for image mode.",
|
||||
),
|
||||
scheme: str | None = typer.Option(
|
||||
None,
|
||||
"--scheme",
|
||||
"-s",
|
||||
help="Color scheme algorithm to use for image mode. Ignored in preset mode.",
|
||||
autocompletion=_complete_scheme_name,
|
||||
),
|
||||
@@ -130,16 +135,26 @@ def generate(
|
||||
),
|
||||
mode: str | None = typer.Option(
|
||||
None,
|
||||
"--mode",
|
||||
"-m",
|
||||
help="Mode of the preset scheme (dark or light).",
|
||||
autocompletion=_complete_mode,
|
||||
),
|
||||
accent: str | None = typer.Option(
|
||||
None,
|
||||
"--accent",
|
||||
"-a",
|
||||
help="Accent for schemes that support it (e.g. mauve).",
|
||||
autocompletion=_complete_accent,
|
||||
),
|
||||
preview: bool = typer.Option(
|
||||
False,
|
||||
"--preview",
|
||||
"-p",
|
||||
help="Preview scheme - internal use",
|
||||
),
|
||||
):
|
||||
if not any([image_path, scheme, preset, mode, accent]):
|
||||
if not any([image_path, scheme, preset, mode, accent, preview]):
|
||||
print(
|
||||
"Hint: use --preset <scheme>:<variant> or --image-path <path>",
|
||||
file=sys.stderr,
|
||||
@@ -685,10 +700,6 @@ def generate(
|
||||
|
||||
variant_val = scheme if not preset else p_variant
|
||||
|
||||
if smart and not preset:
|
||||
apply_gtk_mode(effective_mode)
|
||||
apply_qt_mode(effective_mode, HOME)
|
||||
|
||||
output_dict = {
|
||||
"name": name,
|
||||
"flavor": flavor,
|
||||
@@ -698,6 +709,14 @@ def generate(
|
||||
"seed": seed.to_int(),
|
||||
}
|
||||
|
||||
if preview:
|
||||
print(json.dumps(output_dict))
|
||||
return
|
||||
|
||||
if smart and not preset:
|
||||
apply_gtk_mode(effective_mode)
|
||||
apply_qt_mode(effective_mode, HOME)
|
||||
|
||||
if TEMPLATE_DIR is not None:
|
||||
wp = str(WALL_PATH)
|
||||
ctx = build_template_context(
|
||||
|
||||
Reference in New Issue
Block a user