qutebrowser/qutebrowser/config/configdata.py

1000 lines
36 KiB
Python
Raw Normal View History

2014-06-19 09:04:37 +02:00
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
2014-02-27 18:46:30 +01:00
# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
2014-04-17 17:44:27 +02:00
"""Configuration data for config.py.
Module attributes:
FIRST_COMMENT: The initial comment header to place in the config.
SECTION_DESC: A dictionary with descriptions for sections.
DATA: The config defaults, an OrderedDict of sections.
"""
2014-02-27 18:46:30 +01:00
2014-05-01 15:27:32 +02:00
import re
2014-08-26 19:10:14 +02:00
import collections
2014-02-27 18:46:30 +01:00
from qutebrowser.config import configtypes as typ
2014-08-26 19:10:14 +02:00
from qutebrowser.config import sections as sect
2014-06-03 14:57:57 +02:00
from qutebrowser.config.value import SettingValue
2014-08-26 20:25:11 +02:00
from qutebrowser.utils.qtutils import MAXVALS
2014-05-04 01:06:52 +02:00
FIRST_COMMENT = r"""
2014-02-27 21:05:51 +01:00
# vim: ft=dosini
2014-02-27 21:23:06 +01:00
2014-02-27 21:05:51 +01:00
# Configfile for qutebrowser.
#
# This configfile is parsed by python's configparser in extended
# interpolation mode. The format is very INI-like, so there are
# categories like [general] with "key = value"-pairs.
#
# Note that you shouldn't add your own comments, as this file is
# regenerated every time the config is saved.
#
# Interpolation looks like ${value} or ${section:value} and will be
# replaced by the respective value.
#
# This is the default config, so if you want to remove anything from
# here (as opposed to change/add), for example a keybinding, set it to
# an empty value.
2014-05-01 20:51:07 +02:00
#
2014-05-02 13:30:51 +02:00
# You will need to escape the following values:
2014-05-01 20:51:07 +02:00
# - # at the start of the line (at the first position of the key) (\#)
2014-05-02 13:30:51 +02:00
# - $ in a value ($$)
2014-05-11 21:55:41 +02:00
# - = in a value as <eq>
2014-02-27 21:05:51 +01:00
"""
2014-02-27 18:46:30 +01:00
SECTION_DESC = {
2014-08-02 22:54:15 +02:00
'general': "General/miscellaneous options.",
2014-05-17 23:45:31 +02:00
'ui': "General options related to the user interface.",
2014-04-27 21:21:14 +02:00
'input': "Options related to input modes.",
'network': "Settings related to the network.",
'completion': "Options related to completion and command history.",
2014-08-06 08:10:32 +02:00
'tabs': "Configuration of the tab bar.",
2014-06-03 20:28:51 +02:00
'storage': "Settings related to cache and storage.",
'permissions': "Loaded plugins/scripts and allowed actions.",
2014-04-22 08:42:58 +02:00
'hints': "Hinting settings.",
2014-02-27 18:46:30 +01:00
'searchengines': (
2014-04-22 08:42:58 +02:00
"Definitions of search engines which can be used via the address "
"bar.\n"
2014-05-28 22:39:02 +02:00
"The searchengine named `DEFAULT` is used when "
"`general -> auto-search` is true and something else than a URL was "
"entered to be opened. Other search engines can be used via the "
"bang-syntax, e.g. `:open qutebrowser !google`. The string `{}` will "
"be replaced by the search term, use `{{` and `}}` for literal "
"`{`/`}` signs."),
2014-02-27 18:46:30 +01:00
'aliases': (
2014-04-22 08:42:58 +02:00
"Aliases for commands.\n"
"By default, no aliases are defined. Example which adds a new command "
2014-05-28 22:39:02 +02:00
"`:qtb` to open qutebrowsers website:\n\n"
"`qtb = open http://www.qutebrowser.org/`"),
2014-02-27 18:46:30 +01:00
'colors': (
2014-04-22 08:42:58 +02:00
"Colors used in the UI.\n"
"A value can be in one of the following format:\n\n"
2014-05-28 22:39:02 +02:00
" * `#RGB`/`#RRGGBB`/`#RRRGGGBBB`/`#RRRRGGGGBBBB`\n"
" * A SVG color name as specified in http://www.w3.org/TR/SVG/"
"types.html#ColorKeywords[the W3C specification].\n"
" * transparent (no color)\n"
2014-05-28 22:39:02 +02:00
" * `rgb(r, g, b)` / `rgba(r, g, b, a)` (values 0-255 or "
2014-04-22 08:42:58 +02:00
"percentages)\n"
2014-05-28 22:39:02 +02:00
" * `hsv(h, s, v)` / `hsva(h, s, v, a)` (values 0-255, hue 0-359)\n"
" * A gradient as explained in http://qt-project.org/doc/qt-4.8/"
"stylesheet-reference.html#list-of-property-types[the Qt "
"documentation] under ``Gradient''.\n\n"
2014-05-28 22:39:02 +02:00
"The `hints.*` values are a special case as they're real CSS "
2014-04-22 08:42:58 +02:00
"colors, not Qt-CSS colors. There, for a gradient, you need to use "
2014-05-28 22:39:02 +02:00
"`-webkit-gradient`, see https://www.webkit.org/blog/175/introducing-"
2014-08-08 12:56:07 +02:00
"css-gradients/[the WebKit documentation]."),
2014-02-27 18:46:30 +01:00
'fonts': (
"Fonts used for the UI, with optional style/weight/size.\n\n"
2014-05-28 22:39:02 +02:00
" * Style: `normal`/`italic`/`oblique`\n"
2014-08-02 22:54:15 +02:00
" * Weight: `normal`, `bold`, `100`..`900`\n"
2014-08-08 12:56:07 +02:00
" * Size: _number_ `px`/`pt`"),
2014-02-27 18:46:30 +01:00
}
2014-08-26 19:10:14 +02:00
DATA = collections.OrderedDict([
('general', sect.KeyValue(
2014-04-27 21:21:14 +02:00
('ignore-case',
2014-08-26 19:10:14 +02:00
SettingValue(typ.IgnoreCase(), 'smart'),
2014-08-02 22:54:15 +02:00
"Whether to find text on a page case-insensitively."),
2014-04-27 21:21:14 +02:00
('wrap-search',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether to wrap finding text to the top when arriving at the end."),
('startpage',
2014-08-26 19:10:14 +02:00
SettingValue(typ.List(), 'http://www.duckduckgo.com'),
"The default page(s) to open at the start, separated by commas."),
2014-04-27 21:21:14 +02:00
('auto-search',
2014-08-26 19:10:14 +02:00
SettingValue(typ.AutoSearch(), 'naive'),
"Whether to start a search when something else than a URL is "
"entered."),
2014-04-27 21:21:14 +02:00
('auto-save-config',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
"Whether to save the config automatically on quit."),
2014-04-29 18:00:22 +02:00
('editor',
2014-08-26 19:10:14 +02:00
SettingValue(typ.ShellCommand(placeholder=True), 'gvim -f "{}"'),
2014-08-02 22:54:15 +02:00
"The editor (and arguments) to use for the `open-editor` command.\n\n"
"Use `{}` for the filename. The value gets split like in a shell, so "
"you can use `\"` or `'` to quote arguments."),
2014-06-03 20:28:51 +02:00
2014-08-20 20:57:10 +02:00
('editor-encoding',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Encoding(), 'utf-8'),
2014-08-20 20:57:10 +02:00
"Encoding to use for editor."),
2014-06-03 20:28:51 +02:00
('private-browsing',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Do not record visited pages in the history or store web page "
"icons."),
2014-06-03 20:28:51 +02:00
('developer-extras',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Enable extra tools for Web developers.\n\n"
"This needs to be enabled for `:inspector` to work and also adds an "
"_Inspect_ entry to the context menu."),
2014-06-03 20:28:51 +02:00
('print-element-backgrounds',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether the background color and images are also drawn when the "
"page is printed."),
2014-06-03 20:28:51 +02:00
('xss-auditing',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Whether load requests should be monitored for cross-site scripting "
"attempts.\n\n"
"Suspicious scripts will be blocked and reported in the inspector's "
"JavaScript console. Enabling this feature might have an impact on "
"performance."),
2014-06-03 20:28:51 +02:00
('site-specific-quirks',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Enable workarounds for broken sites."),
2014-06-03 20:28:51 +02:00
('default-encoding',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-08-02 22:54:15 +02:00
"Default encoding to use for websites.\n\n"
"The encoding must be a string describing an encoding such as "
'_utf-8_, _iso-8859-1_, etc. If left empty a default value will be '
"used."),
2014-05-17 23:45:31 +02:00
)),
('ui', sect.KeyValue(
('zoom-levels',
2014-08-26 19:10:14 +02:00
SettingValue(typ.PercList(minval=0),
2014-05-17 23:45:31 +02:00
'25%,33%,50%,67%,75%,90%,100%,110%,125%,150%,175%,200%,'
'250%,300%,400%,500%'),
"The available zoom levels, separated by commas."),
('default-zoom',
2014-08-26 19:10:14 +02:00
SettingValue(typ.ZoomPerc(), '100%'),
2014-05-17 23:45:31 +02:00
"The default zoom level."),
2014-05-16 14:20:37 +02:00
2014-05-16 15:33:36 +02:00
('message-timeout',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Int(), '2000'),
2014-05-16 15:33:36 +02:00
"Time (in ms) to show messages in the statusbar for."),
2014-05-26 12:16:03 +02:00
('confirm-quit',
2014-08-26 19:10:14 +02:00
SettingValue(typ.ConfirmQuit(), 'never'),
"Whether to confirm quitting the application."),
('display-statusbar-messages',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
"Whether to display javascript statusbar messages."),
2014-06-03 20:28:51 +02:00
('zoom-text-only',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Whether the zoom factor on a frame applies only to the text or to "
"all content."),
2014-06-03 20:28:51 +02:00
('frame-flattening',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Whether to expand each subframe to its contents.\n\n"
"This will flatten all the frames to become one scrollable page."),
2014-06-03 20:28:51 +02:00
('user-stylesheet',
2014-09-19 00:37:55 +02:00
SettingValue(typ.UserStyleSheet(),
'::-webkit-scrollbar { width: 0px; height: 0px; }'),
"User stylesheet to use (absolute filename or CSS string)."),
2014-06-03 20:28:51 +02:00
('css-media-type',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-06-03 20:28:51 +02:00
"Set the CSS media type."),
2014-04-27 21:21:14 +02:00
)),
('network', sect.KeyValue(
('do-not-track',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Value to send in the `DNT` header."),
('accept-language',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), 'en-US,en'),
2014-08-02 22:54:15 +02:00
"Value to send in the `accept-language` header."),
2014-05-02 06:54:46 +02:00
('user-agent',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-05-02 06:54:46 +02:00
"User agent to send. Empty to send the default."),
2014-05-05 16:28:43 +02:00
2014-05-05 22:07:41 +02:00
('proxy',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Proxy(), 'system'),
2014-08-02 22:54:15 +02:00
"The proxy to use.\n\n"
"In addition to the listed values, you can use a `socks://...` or "
"`http://...` URL."),
2014-05-12 11:22:32 +02:00
('ssl-strict',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-05-12 11:22:32 +02:00
"Whether to validate SSL handshakes."),
2014-06-03 20:28:51 +02:00
('dns-prefetch',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether to try to pre-fetch DNS entries to speed up browsing."),
)),
2014-04-27 21:21:14 +02:00
('completion', sect.KeyValue(
('show',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether to show the autocompletion window."),
2014-04-27 21:21:14 +02:00
('height',
2014-08-26 19:10:14 +02:00
SettingValue(typ.PercOrInt(minperc=0, maxperc=100, minint=1), '50%'),
2014-04-27 21:21:14 +02:00
"The height of the completion, in px or as percentage of the "
"window."),
('history-length',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Int(minval=-1), '100'),
2014-08-02 22:54:15 +02:00
"How many commands to save in the history.\n\n"
"0: no history / -1: unlimited"),
('quick-complete',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
"Whether to move on to the next part when there's only one possible "
"completion left."),
('shrink',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
"Whether to shrink the completion to be smaller than the configured "
"size if there are no scrollbars."),
2014-04-27 21:21:14 +02:00
)),
2014-04-22 16:45:13 +02:00
2014-04-27 21:21:14 +02:00
('input', sect.KeyValue(
('timeout',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Int(minval=0, maxval=MAXVALS['int']), '500'),
2014-04-22 16:45:13 +02:00
"Timeout for ambiguous keybindings."),
2014-04-24 07:41:20 +02:00
2014-04-27 21:21:14 +02:00
('insert-mode-on-plugins',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-04-24 07:41:20 +02:00
"Whether to switch to insert mode when clicking flash and other "
"plugins."),
2014-04-24 16:03:16 +02:00
('auto-leave-insert-mode',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
"Whether to leave insert mode if a non-editable element is clicked."),
2014-04-27 21:21:14 +02:00
('auto-insert-mode',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-04-24 16:03:16 +02:00
"Whether to automatically enter insert mode if an editable element "
"is focused after page load."),
2014-04-27 21:21:14 +02:00
('forward-unbound-keys',
2014-08-26 19:10:14 +02:00
SettingValue(typ.ForwardUnboundKeys(), 'auto'),
"Whether to forward unbound keys to the webview in normal mode."),
2014-06-03 20:28:51 +02:00
('spatial-navigation',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Enables or disables the Spatial Navigation feature\n\n"
"Spatial navigation consists in the ability to navigate between "
"focusable elements in a Web page, such as hyperlinks and form "
"controls, by using Left, Right, Up and Down arrow keys. For "
"example, if a user presses the Right key, heuristics determine "
"whether there is an element he might be trying to reach towards the "
"right and which element he probably wants."),
2014-06-03 20:28:51 +02:00
('links-included-in-focus-chain',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
"Whether hyperlinks should be included in the keyboard focus chain."),
)),
2014-08-06 08:10:32 +02:00
('tabs', sect.KeyValue(
('background-tabs',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-06 08:10:32 +02:00
"Whether to open new tabs (middleclick/ctrl+click) in background."),
2014-04-27 21:21:14 +02:00
('select-on-remove',
2014-08-26 19:10:14 +02:00
SettingValue(typ.SelectOnRemove(), 'right'),
"Which tab to select when the focused tab is removed."),
('new-tab-position',
2014-08-26 19:10:14 +02:00
SettingValue(typ.NewTabPosition(), 'right'),
"How new tabs are positioned."),
('new-tab-position-explicit',
2014-08-26 19:10:14 +02:00
SettingValue(typ.NewTabPosition(), 'last'),
"How new tabs opened explicitely are positioned."),
2014-04-27 21:21:14 +02:00
('last-close',
2014-08-26 19:10:14 +02:00
SettingValue(typ.LastClose(), 'ignore'),
"Behaviour when the last tab is closed."),
2014-09-18 18:15:37 +02:00
('auto-hide',
SettingValue(typ.Bool(), 'false'),
"Hide the tabbar if only one tab is open."),
('wrap',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
"Whether to wrap when changing tabs."),
2014-05-12 16:04:43 +02:00
2014-08-06 08:10:32 +02:00
('movable',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-06 08:10:32 +02:00
"Whether tabs should be movable."),
('close-mouse-button',
2014-08-26 19:10:14 +02:00
SettingValue(typ.CloseButton(), 'middle'),
2014-08-06 08:10:32 +02:00
"On which mouse button to close tabs."),
('position',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Position(), 'north'),
2014-08-06 08:10:32 +02:00
"The position of the tab bar."),
2014-05-12 23:03:55 +02:00
('show-favicons',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-05-12 23:03:55 +02:00
"Whether to show favicons in the tab bar."),
2014-07-15 21:20:57 +02:00
('width',
2014-08-26 19:10:14 +02:00
SettingValue(typ.PercOrInt(minperc=0, maxperc=100, minint=1), '20%'),
2014-07-15 21:20:57 +02:00
"The width of the tab bar if it's vertical, in px or as percentage "
"of the window."),
2014-07-16 13:51:16 +02:00
('indicator-width',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Int(minval=0), '3'),
"Width of the progress indicator (0 to disable)."),
2014-07-16 13:51:16 +02:00
('indicator-space',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Int(minval=0), '3'),
2014-07-16 13:51:16 +02:00
"Spacing between tab edge and indicator."),
)),
2014-06-03 20:28:51 +02:00
('storage', sect.KeyValue(
2014-06-11 21:55:23 +02:00
('download-directory',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Directory(none_ok=True), ''),
2014-06-11 21:55:23 +02:00
"The directory to save downloads to. An empty value selects a "
"sensible os-specific default."),
2014-06-03 20:28:51 +02:00
('maximum-pages-in-cache',
2014-08-26 19:10:14 +02:00
SettingValue(
typ.Int(none_ok=True, minval=0, maxval=MAXVALS['int']), ''),
2014-08-02 22:54:15 +02:00
"The maximum number of pages to hold in the memory page cache.\n\n"
"The Page Cache allows for a nicer user experience when navigating "
"forth or back to pages in the forward/back history, by pausing and "
"resuming up to _n_ pages.\n\n"
"For more information about the feature, please refer to: "
"http://webkit.org/blog/427/webkit-page-cache-i-the-basics/"),
2014-06-03 20:28:51 +02:00
('object-cache-capacities',
2014-08-26 19:10:14 +02:00
SettingValue(
typ.WebKitBytesList(length=3, maxsize=MAXVALS['int']), ''),
2014-08-02 22:54:15 +02:00
"The capacities for the memory cache for dead objects such as "
"stylesheets or scripts. Syntax: cacheMinDeadCapacity, cacheMaxDead, "
"totalCapacity.\n\n"
"The _cacheMinDeadCapacity_ specifies the minimum number of bytes "
"that dead objects should consume when the cache is under "
"pressure.\n\n"
"_cacheMaxDead_ is the maximum number of bytes that dead objects "
"should consume when the cache is *not* under pressure.\n\n"
"_totalCapacity_ specifies the maximum number of bytes "
"that the cache should consume *overall*."),
2014-06-03 20:28:51 +02:00
('offline-storage-default-quota',
2014-08-26 19:10:14 +02:00
SettingValue(typ.WebKitBytes(maxsize=MAXVALS['int64']), ''),
2014-06-03 20:28:51 +02:00
"Default quota for new offline storage databases."),
('offline-web-application-cache-quota',
2014-08-26 19:10:14 +02:00
SettingValue(typ.WebKitBytes(maxsize=MAXVALS['int64']), ''),
2014-06-03 20:28:51 +02:00
"Quota for the offline web application cache."),
('offline-storage-database',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether support for the HTML 5 offline storage feature is enabled."),
2014-06-03 20:28:51 +02:00
('offline-web-application-storage',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether support for the HTML 5 web application cache feature is "
"enabled.\n\n"
"An application cache acts like an HTTP cache in some sense. For "
"documents that use the application cache via JavaScript, the loader "
"engine will first ask the application cache for the contents, "
"before hitting the network.\n\n"
"The feature is described in details at: "
"http://dev.w3.org/html5/spec/Overview.html#appcache"),
2014-06-03 20:28:51 +02:00
('local-storage',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether support for the HTML 5 local storage feature is enabled."),
2014-09-01 19:42:21 +02:00
('cache-size',
SettingValue(typ.Int(minval=0, maxval=MAXVALS['int64']), '52428800'),
"Size of the HTTP network cache."),
2014-06-03 20:28:51 +02:00
)),
('permissions', sect.KeyValue(
('allow-images',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether images are automatically loaded in web pages."),
2014-06-03 20:28:51 +02:00
('allow-javascript',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
"Enables or disables the running of JavaScript programs."),
2014-06-03 20:28:51 +02:00
('allow-plugins',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Enables or disables plugins in Web pages.\n\n"
'Qt plugins with a mimetype such as "application/x-qt-plugin" are '
"not affected by this setting."),
2014-06-03 20:28:51 +02:00
#('allow-java',
2014-08-26 19:10:14 +02:00
# SettingValue(typ.Bool(), 'true'),
2014-06-03 20:28:51 +02:00
# "Enables or disables Java applets. Currently Java applets are "
# "not supported"),
2014-04-27 21:21:14 +02:00
('javascript-can-open-windows',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Whether JavaScript programs can open new windows."),
2014-04-27 21:21:14 +02:00
('javascript-can-close-windows',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Whether JavaScript programs can close windows."),
2014-04-27 21:21:14 +02:00
('javascript-can-access-clipboard',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Whether JavaScript programs can read or write to the clipboard."),
2014-04-27 21:21:14 +02:00
('local-content-can-access-remote-urls',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'false'),
2014-08-02 22:54:15 +02:00
"Whether locally loaded documents are allowed to access remote "
"urls."),
2014-04-27 21:21:14 +02:00
('local-content-can-access-file-urls',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-08-02 22:54:15 +02:00
"Whether locally loaded documents are allowed to access other local "
"urls."),
2014-06-03 20:28:51 +02:00
('cookies-accept',
2014-08-26 19:10:14 +02:00
SettingValue(typ.AcceptCookies(), 'default'),
2014-06-03 20:28:51 +02:00
"Whether to accept cookies."),
2014-06-03 20:28:51 +02:00
('cookies-store',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-06-03 20:28:51 +02:00
"Whether to store cookies."),
)),
2014-04-20 19:24:22 +02:00
('hints', sect.KeyValue(
('border',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(), '1px solid #E3BE23'),
2014-04-20 19:24:22 +02:00
"CSS border value for hints."),
2014-04-21 21:05:39 +02:00
2014-04-20 19:24:22 +02:00
('opacity',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Float(minval=0.0, maxval=1.0), '0.7'),
2014-04-20 19:24:22 +02:00
"Opacity for hints."),
2014-04-21 21:05:39 +02:00
2014-05-02 17:53:16 +02:00
('mode',
2014-08-26 19:10:14 +02:00
SettingValue(typ.HintMode(), 'letter'),
"Mode to use for hints."),
2014-05-02 17:53:16 +02:00
2014-04-21 21:05:39 +02:00
('chars',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(minlen=2), 'asdfghjkl'),
2014-04-20 23:58:14 +02:00
"Chars used for hint strings."),
2014-04-27 21:59:23 +02:00
('auto-follow',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Bool(), 'true'),
2014-04-27 21:59:23 +02:00
"Whether to auto-follow a hint if there's only one left."),
2014-05-01 15:27:32 +02:00
('next-regexes',
2014-08-26 19:10:14 +02:00
SettingValue(typ.RegexList(flags=re.IGNORECASE),
r'\bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b'),
2014-05-01 15:27:32 +02:00
"A comma-separated list of regexes to use for 'next' links."),
('prev-regexes',
2014-08-26 19:10:14 +02:00
SettingValue(typ.RegexList(flags=re.IGNORECASE),
r'\bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,'
r'\b(<<|«)\b'),
2014-05-01 15:27:32 +02:00
"A comma-separated list of regexes to use for 'prev' links."),
2014-04-20 19:24:22 +02:00
)),
('searchengines', sect.ValueList(
2014-08-26 19:10:14 +02:00
typ.SearchEngineName(), typ.SearchEngineUrl(),
('DEFAULT', '${duckduckgo}'),
('duckduckgo', 'https://duckduckgo.com/?q={}'),
('ddg', '${duckduckgo}'),
('google', 'https://encrypted.google.com/search?q={}'),
('g', '${google}'),
('wikipedia', 'http://en.wikipedia.org/w/index.php?'
'title=Special:Search&search={}'),
('wiki', '${wikipedia}'),
)),
('aliases', sect.ValueList(
2014-08-26 19:10:14 +02:00
typ.String(forbidden=' '), typ.Command(),
)),
('colors', sect.KeyValue(
('completion.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), 'white'),
2014-05-09 19:47:20 +02:00
"Text color of the completion widget."),
('completion.bg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '#333333'),
2014-08-02 22:54:15 +02:00
"Background color of the completion widget."),
('completion.item.bg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '${completion.bg}'),
"Background color of completion widget items."),
2014-05-09 19:47:20 +02:00
('completion.category.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), 'white'),
2014-05-09 19:47:20 +02:00
"Foreground color of completion widget category headers."),
('completion.category.bg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'qlineargradient(x1:0, y1:0, x2:0, '
2014-07-17 21:35:27 +02:00
'y2:1, stop:0 #888888, stop:1 #505050)'),
"Background color of the completion widget category headers."),
('completion.category.border.top',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'black'),
"Top border color of the completion widget category headers."),
('completion.category.border.bottom',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '${completion.category.border.top}'),
"Bottom border color of the completion widget category headers."),
('completion.item.selected.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), 'black'),
"Foreground color of the selected completion item."),
('completion.item.selected.bg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '#e8c000'),
"Background color of the selected completion item."),
('completion.item.selected.border.top',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '#bbbb00'),
"Top border color of the completion widget category headers."),
('completion.item.selected.border.bottom',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '${completion.item.selected.border.'
2014-07-17 21:35:27 +02:00
'top}'),
"Bottom border color of the selected completion item."),
('completion.match.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '#ff4444'),
"Foreground color of the matched text in the completion."),
('statusbar.bg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'black'),
"Foreground color of the statusbar."),
('statusbar.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'white'),
"Foreground color of the statusbar."),
('statusbar.bg.error',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'red'),
"Background color of the statusbar if there was an error."),
2014-05-26 16:59:11 +02:00
('statusbar.bg.prompt',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'darkblue'),
2014-05-26 16:59:11 +02:00
"Background color of the statusbar if there is a prompt."),
2014-06-23 16:43:59 +02:00
('statusbar.bg.insert',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'darkgreen'),
2014-06-23 16:43:59 +02:00
"Background color of the statusbar in insert mode."),
('statusbar.progress.bg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'white'),
"Background color of the progress bar."),
('statusbar.url.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '${statusbar.fg}'),
"Default foreground color of the URL in the statusbar."),
('statusbar.url.fg.success',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'lime'),
"Foreground color of the URL in the statusbar on successful "
"load."),
('statusbar.url.fg.error',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'orange'),
"Foreground color of the URL in the statusbar on error."),
('statusbar.url.fg.warn',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'yellow'),
"Foreground color of the URL in the statusbar when there's a "
"warning."),
('statusbar.url.fg.hover',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'aqua'),
"Foreground color of the URL in the statusbar for hovered links."),
('tab.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), 'white'),
2014-04-22 20:49:16 +02:00
"Foreground color of tabs."),
('tab.bg.odd',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), 'grey'),
"Background color of unselected odd tabs."),
('tab.bg.even',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), 'darkgrey'),
"Background color of unselected even tabs."),
('tab.bg.selected',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), 'black'),
2014-04-22 20:49:16 +02:00
"Background color of selected tabs."),
('tab.bg.bar',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), '#555555'),
2014-04-22 20:49:16 +02:00
"Background color of the tabbar."),
2014-07-16 13:51:16 +02:00
('tab.indicator.start',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), '#0000aa'),
2014-07-16 13:51:16 +02:00
"Color gradient start for the tab indicator."),
('tab.indicator.stop',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), '#00aa00'),
2014-07-16 13:51:16 +02:00
"Color gradient end for the tab indicator."),
('tab.indicator.error',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), '#ff0000'),
2014-07-16 13:51:16 +02:00
"Color for the tab indicator on errors.."),
('tab.indicator.system',
2014-08-26 19:10:14 +02:00
SettingValue(typ.ColorSystem(), 'rgb'),
2014-07-16 13:51:16 +02:00
"Color gradient interpolation system for the tab indicator."),
('tab.seperator',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), '#555555'),
"Color for the tab seperator."),
2014-04-20 19:24:22 +02:00
('hints.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.CssColor(), 'black'),
2014-04-20 19:24:22 +02:00
"Font color for hints."),
2014-04-21 15:45:29 +02:00
('hints.fg.match',
2014-08-26 19:10:14 +02:00
SettingValue(typ.CssColor(), 'green'),
2014-04-21 15:45:29 +02:00
"Font color for the matched part of hints."),
2014-04-20 19:24:22 +02:00
('hints.bg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.CssColor(), '-webkit-gradient(linear, left top, '
'left bottom, color-stop(0%,#FFF785), '
'color-stop(100%,#FFC542))'),
2014-04-20 19:24:22 +02:00
"Background color for hints."),
2014-06-12 21:43:30 +02:00
2014-06-13 07:41:51 +02:00
('downloads.fg',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), '#ffffff'),
2014-06-12 21:43:30 +02:00
"Foreground color for downloads."),
2014-06-13 07:41:51 +02:00
('downloads.bg.bar',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QssColor(), 'black'),
2014-06-13 07:39:47 +02:00
"Background color for the download bar."),
2014-06-13 07:41:51 +02:00
('downloads.bg.start',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), '#0000aa'),
2014-06-12 21:43:30 +02:00
"Color gradient start for downloads."),
2014-06-13 07:41:51 +02:00
('downloads.bg.stop',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtColor(), '#00aa00'),
2014-06-12 21:43:30 +02:00
"Color gradient end for downloads."),
2014-06-13 07:41:51 +02:00
('downloads.bg.system',
2014-08-26 19:10:14 +02:00
SettingValue(typ.ColorSystem(), 'rgb'),
2014-06-12 21:43:30 +02:00
"Color gradient interpolation system for downloads."),
)),
('fonts', sect.KeyValue(
('_monospace',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Font(), 'Terminus, Monospace, "DejaVu Sans Mono", '
'Monaco, "Bitstream Vera Sans Mono", "Andale Mono", '
'"Liberation Mono", "Courier New", Courier, monospace, '
'Fixed, Consolas, Terminal'),
"Default monospace fonts."),
('completion',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Font(), '8pt ${_monospace}'),
"Font used in the completion widget."),
('tabbar',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtFont(), '8pt ${_monospace}'),
"Font used in the tabbar."),
('statusbar',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Font(), '8pt ${_monospace}'),
"Font used in the statusbar."),
2014-06-13 07:41:51 +02:00
('downloads',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Font(), '8pt ${_monospace}'),
2014-06-13 07:39:47 +02:00
"Font used for the downloadbar."),
2014-04-20 19:24:22 +02:00
('hints',
2014-08-26 19:10:14 +02:00
SettingValue(typ.Font(), 'bold 12px Monospace'),
2014-04-20 19:24:22 +02:00
"Font used for the hints."),
2014-06-03 20:28:51 +02:00
2014-08-13 06:56:46 +02:00
('debug-console',
2014-08-26 19:10:14 +02:00
SettingValue(typ.QtFont(), '8pt ${_monospace}'),
2014-08-13 06:56:46 +02:00
"Font used for the debugging console."),
2014-06-03 20:28:51 +02:00
('web-family-standard',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-06-03 20:28:51 +02:00
"Font family for standard fonts."),
('web-family-fixed',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-06-03 20:28:51 +02:00
"Font family for fixed fonts."),
('web-family-serif',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-06-03 20:28:51 +02:00
"Font family for serif fonts."),
('web-family-sans-serif',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-06-03 20:28:51 +02:00
"Font family for sans-serif fonts."),
('web-family-cursive',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-06-03 20:28:51 +02:00
"Font family for cursive fonts."),
('web-family-fantasy',
2014-08-26 19:10:14 +02:00
SettingValue(typ.String(none_ok=True), ''),
2014-06-03 20:28:51 +02:00
"Font family for fantasy fonts."),
('web-size-minimum',
2014-08-26 19:10:14 +02:00
SettingValue(
typ.Int(none_ok=True, minval=1, maxval=MAXVALS['int']), ''),
2014-06-03 20:28:51 +02:00
"The hard minimum font size."),
('web-size-minimum-logical',
2014-08-26 19:10:14 +02:00
SettingValue(
typ.Int(none_ok=True, minval=1, maxval=MAXVALS['int']), ''),
2014-06-03 20:28:51 +02:00
"The minimum logical font size that is applied when zooming out."),
('web-size-default',
2014-08-26 19:10:14 +02:00
SettingValue(
typ.Int(none_ok=True, minval=1, maxval=MAXVALS['int']), ''),
"The default font size for regular text."),
2014-06-03 20:28:51 +02:00
('web-size-default-fixed',
2014-08-26 19:10:14 +02:00
SettingValue(
typ.Int(none_ok=True, minval=1, maxval=MAXVALS['int']), ''),
2014-06-03 20:28:51 +02:00
"The default font size for fixed-pitch text."),
)),
])
2014-09-08 16:53:33 +02:00
KEY_FIRST_COMMENT = """
# vim: ft=conf
#
2014-09-09 22:34:20 +02:00
# In this config file, qutebrowser's keybindings are configured.
# The format looks like this:
#
# [keymode]
#
# command
# keychain
# keychain2
# ...
#
# All blank lines and lines starting with '#' are ignored.
# Inline-comments are not permitted.
2014-09-08 16:53:33 +02:00
#
# keymode is a comma separated list of modes in which the keybinding should be
# active. If keymode starts with !, the keybinding is active in all modes
# except the listed modes.
#
2014-09-08 16:53:33 +02:00
# For special keys (can't be part of a keychain), enclose them in `<`...`>`.
# For modifiers, you can use either `-` or `+` as delimiters, and these names:
#
# * Control: `Control`, `Ctrl`
# * Meta: `Meta`, `Windows`, `Mod4`
# * Alt: `Alt`, `Mod1`
# * Shift: `Shift`
#
# For simple keys (no `<>`-signs), a capital letter means the key is pressed
# with Shift. For special keys (with `<>`-signs), you need to explicitely add
# `Shift-` to match a key pressed with shift. You can bind multiple commands
# by separating them with `;;`.
"""
2014-09-08 16:53:33 +02:00
KEY_SECTION_DESC = {
'all': "Keybindings active in all modes.",
'normal': "Keybindings for normal mode.",
'insert': (
"Keybindings for insert mode.\n"
"Since normal keypresses are passed through, only special keys are "
"supported in this mode.\n"
"Useful hidden commands to map in this section:\n\n"
" * `open-editor`: Open a texteditor with the focused field."),
'hint': (
"Keybindings for hint mode.\n"
"Since normal keypresses are passed through, only special keys are "
"supported in this mode.\n"
"Useful hidden commands to map in this section:\n\n"
" * `follow-hint`: Follow the currently selected hint."),
'passthrough': (
"Keybindings for passthrough mode.\n"
"Since normal keypresses are passed through, only special keys are "
"supported in this mode."),
'command': (
"Keybindings for command mode.\n"
"Since normal keypresses are passed through, only special keys are "
"supported in this mode.\n"
"Useful hidden commands to map in this section:\n\n"
" * `command-history-prev`: Switch to previous command in history.\n"
" * `command-history-next`: Switch to next command in history.\n"
" * `completion-item-prev`: Select previous item in completion.\n"
" * `completion-item-next`: Select next item in completion.\n"
" * `command-accept`: Execute the command currently in the "
"commandline."),
'prompt': (
"Keybindings for prompts in the status line.\n"
"You can bind normal keys in this mode, but they will be only active "
"when a yes/no-prompt is asked. For other prompt modes, you can only "
"bind special keys.\n"
"Useful hidden commands to map in this section:\n\n"
" * `prompt-accept`: Confirm the entered value.\n"
" * `prompt-yes`: Answer yes to a yes/no question.\n"
" * `prompt-no`: Answer no to a yes/no question."),
}
2014-09-08 16:53:33 +02:00
KEY_DATA = collections.OrderedDict([
('!normal', collections.OrderedDict([
('leave-mode', ['<Escape>', '<Ctrl-[>']),
])),
('normal', collections.OrderedDict([
('set-cmd-text ":open "', ['o']),
('set-cmd-text ":open {url}"', ['go']),
('set-cmd-text ":open -t "', ['O']),
('set-cmd-text ":open -t {url}"', ['gO']),
('set-cmd-text ":open -b "', ['xo']),
('set-cmd-text ":open -b {url}"', ['xO']),
('open -t about:blank', ['ga']),
2014-09-09 22:34:20 +02:00
('tab-close', ['d', '<Ctrl-W>']),
('tab-only', ['co']),
('tab-focus', ['T']),
('tab-move', ['gm']),
('tab-move -', ['gl']),
('tab-move +', ['gr']),
('tab-next', ['J']),
('tab-prev', ['K']),
('reload', ['r']),
2014-09-09 22:34:20 +02:00
('back', ['H', '<Backspace>']),
('forward', ['L']),
('hint', ['f']),
('hint all tab', ['F']),
('hint all tab-bg', [';b']),
('hint images', [';i']),
('hint images tab', [';I']),
('hint images tab-bg', ['.i']),
('hint links fill ":open {hint-url}"', [';o']),
('hint links fill ":open -t {hint-url}"', [';O']),
('hint links fill ":open -b {hint-url}"', ['.o']),
('hint links yank', [';y']),
('hint links yank-primary', [';Y']),
('hint links rapid', [';r']),
('hint links download', [';d']),
('scroll -50 0', ['h']),
('scroll 0 50', ['j']),
('scroll 0 -50', ['k']),
('scroll 50 0', ['l']),
2014-09-09 22:34:20 +02:00
('undo', ['u', '<Ctrl-Shift-T>']),
('scroll-perc 0', ['gg']),
('scroll-perc', ['G']),
('search-next', ['n']),
('search-prev', ['N']),
('enter-mode insert', ['i']),
('yank', ['yy']),
('yank -s', ['yY']),
('yank -t', ['yt']),
('yank -ts', ['yT']),
('paste', ['pp']),
('paste -s', ['pP']),
('paste -t', ['Pp']),
('paste -ts', ['PP']),
('quickmark-save', ['m']),
('set-cmd-text ":quickmark-load "', ['b']),
('set-cmd-text ":quickmark-load -t "', ['B']),
('save', ['sf']),
('set-cmd-text ":set "', ['ss']),
('set-cmd-text ":set -t "', ['sl']),
('set-cmd-text ":set keybind "', ['sk']),
('zoom-out', ['-']),
('zoom-in', ['+']),
('zoom', ['=']),
('navigate prev', ['[[']),
('navigate next', [']]']),
('navigate prev -t', ['{{']),
('navigate next -t', ['}}']),
('inspector', ['wi']),
('download-page', ['gd']),
('cancel-download', ['ad']),
('view-source', ['gf']),
('tab-focus last', ['<Ctrl-Tab>']),
('enter-mode passthrough', ['<Ctrl-V>']),
('quit', ['<Ctrl-Q>']),
('open -t about:blank', ['<Ctrl-T>']),
('scroll-page 0 1', ['<Ctrl-F>']),
('scroll-page 0 -1', ['<Ctrl-B>']),
('scroll-page 0 0.5', ['<Ctrl-D>']),
('scroll-page 0 -0.5', ['<Ctrl-U>']),
('tab-focus 1', ['<Alt-1>']),
('tab-focus 2', ['<Alt-2>']),
('tab-focus 3', ['<Alt-3>']),
('tab-focus 4', ['<Alt-4>']),
('tab-focus 5', ['<Alt-5>']),
('tab-focus 6', ['<Alt-6>']),
('tab-focus 7', ['<Alt-7>']),
('tab-focus 8', ['<Alt-8>']),
('tab-focus 9', ['<Alt-9>']),
('home', ['<Ctrl-h>']),
('stop', ['<Ctrl-s>']),
('print', ['<Ctrl-Alt-p>']),
])),
('insert', collections.OrderedDict([
('open-editor', ['<Ctrl-E>']),
])),
('hint', collections.OrderedDict([
('follow-hint', ['<Return>']),
])),
('passthrough', {}),
('command', collections.OrderedDict([
('command-history-prev', ['<Ctrl-P>']),
('command-history-next', ['<Ctrl-N>']),
2014-09-12 07:18:04 +02:00
('completion-item-prev', ['<Shift-Tab>', '<Up>']),
('completion-item-next', ['<Tab>', '<Down>']),
('command-accept', ['<Return>', '<Ctrl-J>', '<Shift-Return>']),
])),
('prompt', collections.OrderedDict([
2014-09-12 07:18:04 +02:00
('prompt-accept', ['<Return>', '<Ctrl-J>', '<Shift-Return>']),
('prompt-yes', ['y']),
('prompt-no', ['n']),
])),
('command,prompt', collections.OrderedDict([
('rl-backward-char', ['<Ctrl-B>']),
('rl-forward-char', ['<Ctrl-F>']),
('rl-backward-word', ['<Alt-B>']),
('rl-forward-word', ['<Alt-F>']),
('rl-beginning-of-line', ['<Ctrl-A>']),
('rl-end-of-line', ['<Ctrl-E>']),
('rl-unix-line-discard', ['<Ctrl-U>']),
('rl-kill-line', ['<Ctrl-K>']),
('rl-kill-word', ['<Alt-D>']),
('rl-unix-word-rubout', ['<Ctrl-W>']),
('rl-yank', ['<Ctrl-Y>']),
('rl-delete-char', ['<Ctrl-?>']),
('rl-backward-delete-char', ['<Ctrl-H>']),
])),
])