From ca78c94e71b36393ab3458375f359ab272d41b70 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 25 Jun 2024 19:20:08 +0900 Subject: [PATCH] qpdfview: update configs --- extra_configs/qpdfview/update_config.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/extra_configs/qpdfview/update_config.py b/extra_configs/qpdfview/update_config.py index 9498674..0b7e347 100755 --- a/extra_configs/qpdfview/update_config.py +++ b/extra_configs/qpdfview/update_config.py @@ -32,12 +32,16 @@ config["documentView"]["autoRefresh"] = "true" config["documentView"]["highlightAll"] = "true" config["documentView"]["highlightCurrentThumbnail"] = "true" config["documentView"]["highlightDuration"] = "5000" +config["documentView"]["limitThumbnailsToResults"] = "true" config["documentView"]["prefetch"] = "true" config["documentView"]["prefetchDistance"] = "5" config["documentView"]["relativeJumps"] = "true" +config["mainWindow"]["recentlyClosedCount"] = "20" +config["mainWindow"]["recentlyUsedCount"] = "40" config["mainWindow"]["restorePerFileSettings"] = "true" config["mainWindow"]["restoreTabs"] = "true" +config["mainWindow"]["searchableMenus"] = "true" config["mainWindow"]["tabVisibility"] = "0" config["mainWindow"]["trackRecentlyUsed"] = "true" config["mainWindow"]["viewToolBar"] = "scaleFactor, zoomIn, zoomOut, fitToPageWidthMode" @@ -54,12 +58,15 @@ QPDFVIEW_CONFIG_SHORTCUTS = QPDFVIEW_CONFIGDIR + "shortcuts.conf" if os.path.exists(QPDFVIEW_CONFIG_SHORTCUTS): shutil.copyfile(QPDFVIEW_CONFIG_SHORTCUTS, QPDFVIEW_CONFIG_SHORTCUTS + ".orig") -config = configparser.RawConfigParser() -config.optionxform = lambda optionstr: optionstr -config.read(QPDFVIEW_CONFIG_SHORTCUTS) +shortcut_config = configparser.RawConfigParser() +shortcut_config.optionxform = lambda optionstr: optionstr +shortcut_config.read(QPDFVIEW_CONFIG_SHORTCUTS) -config["General"]["nextPage"] = "Space, N" -config["General"]["previousPage"] = "Backspace, P" +shortcut_config["General"]["continuousMode"] = "Ctrl+7, C" +shortcut_config["General"]["findNext"] = "Ctrl+G, Return" +shortcut_config["General"]["findPrevious"] = "Ctrl+Shift+G, Shift+Return" +shortcut_config["General"]["nextPage"] = "Space, N" +shortcut_config["General"]["previousPage"] = "Backspace, P" with open(QPDFVIEW_CONFIG_SHORTCUTS, "w") as file: config.write(file, space_around_delimiters=False)