From b932bd0e661b807fddd7f86ee8585273230b1866 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 11 Jun 2022 23:21:22 +0200 Subject: [PATCH] Make PDF viewer configurable --- maintain.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maintain.py b/maintain.py index e44c575..ada52c2 100755 --- a/maintain.py +++ b/maintain.py @@ -41,6 +41,9 @@ MIN_NUM_WIDTH = 6 # only used for INDEX_DIR files # How many pages are displayed as context ID_AROUND_RANGE = 10 +# The PDF Viewer you want to open (as list of arguments) +PDF_VIEWER_ARGS = ["zathura", "--mode=fullscreen"] + # === Patterns @@ -536,7 +539,7 @@ def cmd_merge(args, scans): with tempfile.NamedTemporaryFile() as fp: subprocess.run(build_cmd(fp.name), check=True, shell=True) if args.view: - pdf_viewer = subprocess.Popen(["zathura", "--mode=fullscreen", fp.name], stdin=subprocess.PIPE, stdout=subprocess.PIPE) + pdf_viewer = subprocess.Popen(PDF_VIEWER_ARGS + [fp.name], stdin=subprocess.PIPE, stdout=subprocess.PIPE) # get existing parameters doc_dates = [format_date(datetime.now())] + extract_dates(found) doc_dates = [] + doc_dates