From 43322a475e3630e47973fcc44a21147ccc807278 Mon Sep 17 00:00:00 2001 From: surtur Date: Wed, 6 Apr 2022 22:18:57 +0200 Subject: [PATCH] qutebrowser: format dicts --- .config/qutebrowser/config.py | 51 +++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index a9ee57f..b2f3d8f 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -21,6 +21,17 @@ c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103 # Change the argument to True to still load settings configured via autoconfig.yml config.load_autoconfig(False) +# Aliases for commands. The keys of the given dictionary are the +# aliases, while the values are the commands they map to. +# Type: Dict +c.aliases = { + 'w': 'session-save', 'q': 'quit', 'qa': 'quit', 'wq': 'quit --save', + 'wqa': 'quit --save', + 'tor': 'config-cycle -p content.proxy socks://localhost:9050/ system', + 'toroff': 'set content.proxy system', + 'toron': 'set content.proxy socks://localhost:9050' +} + # Force a Qt platform to use. This sets the `QT_QPA_PLATFORM` # environment variable and is useful to force using the XCB plugin when # running QtWebEngine on Wayland. @@ -194,7 +205,40 @@ c.content.user_stylesheets = 'stylesheets/user.css' # CSS selectors used to determine which elements on a page should have # hints. # Type: Dict -c.hints.selectors = {'all': ['a', 'area', 'textarea', 'select', 'input:not([type="hidden"])', 'button', 'frame', 'iframe', 'img', 'link', 'summary', '[contenteditable]:not([contenteditable="false"])', '[onclick]', '[onmousedown]', '[role="link"]', '[role="option"]', '[role="button"]', '[ng-click]', '[ngClick]', '[data-ng-click]', '[x-ng-click]', '[tabindex]'], 'links': ['a[href]', 'area[href]', 'link[href]', '[role="link"][href]'], 'images': ['img'], 'media': ['audio', 'img', 'video'], 'url': ['[src]', '[href]'], 'inputs': ['input[type="text"]', 'input[type="date"]', 'input[type="datetime-local"]', 'input[type="email"]', 'input[type="month"]', 'input[type="number"]', 'input[type="password"]', 'input[type="search"]', 'input[type="tel"]', 'input[type="time"]', 'input[type="url"]', 'input[type="week"]', 'input:not([type])', '[contenteditable]:not([contenteditable="false"])', 'textarea'], 'code': [':not(pre) > code', 'pre']} +c.hints.selectors = { + 'all': [ + 'a', 'area', 'textarea', 'select', 'input:not([type="hidden"])', + 'button', 'frame', 'iframe', 'img', 'link', 'summary', + '[contenteditable]:not([contenteditable="false"])', '[onclick]', + '[onmousedown]', '[role="link"]', '[role="option"]', '[role="button"]', + '[ng-click]', '[ngClick]', '[data-ng-click]', '[x-ng-click]', + '[tabindex]' + ], + 'links': [ + 'a[href]', 'area[href]', 'link[href]', '[role="link"][href]' + ], + 'images': [ + 'img' + ], + 'media': [ + 'audio', 'img', 'video' + ], + 'url': [ + '[src]', '[href]' + ], + 'inputs': [ + 'input[type="text"]', 'input[type="date"]', + 'input[type="datetime-local"]', 'input[type="email"]', + 'input[type="month"]', 'input[type="number"]', + 'input[type="password"]', 'input[type="search"]', 'input[type="tel"]', + 'input[type="time"]', 'input[type="url"]', 'input[type="week"]', + 'input:not([type])', + '[contenteditable]:not([contenteditable="false"])', 'textarea' + ], + 'code': [ + ':not(pre) > code', 'pre' + ] +} # Position of the tab bar. # Type: Position @@ -261,7 +305,10 @@ c.zoom.default = '110%' # Available zoom levels. # Type: List of Perc -c.zoom.levels = ['25%', '33%', '50%', '67%', '75%', '90%', '100%', '110%', '120%', '125%', '150%', '175%', '200%', '250%', '300%', '400%', '500%'] +c.zoom.levels = [ + '25%', '33%', '50%', '67%', '75%', '90%', '100%', '110%', '120%', + '125%', '150%', '175%', '200%', '250%', '300%', '400%', '500%' +] # Background color for webpages if unset (or empty to use the theme's # color).