From 8e2b2d113be572eef44bf30a2567a97d3a7c0442 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 18 Sep 2017 06:25:39 +0200 Subject: [PATCH] Improve explanations for dicts in the config --- doc/help/configuring.asciidoc | 4 ++-- doc/help/settings.asciidoc | 5 ++++- qutebrowser/config/configdata.yml | 14 ++++++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/doc/help/configuring.asciidoc b/doc/help/configuring.asciidoc index b938af21c..703978019 100644 --- a/doc/help/configuring.asciidoc +++ b/doc/help/configuring.asciidoc @@ -105,8 +105,8 @@ accepted values depend on the type of the option. Commonly used are: - Booleans: `c.completion.shrink = True` - Integers: `c.messages.timeout = 5000` - Dictionaries: - * `c.headers.custom = {'X-Hello': 'World'}` to override any other values in the - dictionary. + * `c.headers.custom = {'X-Hello': 'World', 'X-Awesome': 'yes'}` to override + any other values in the dictionary. * `c.aliases['foo'] = ':message-info foo'` to add a single value. - Lists: * `c.url.start_pages = ["https://www.qutebrowser.org/"]` to override any diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index b0d5707fb..aff506d7e 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -254,6 +254,7 @@ [[aliases]] === aliases Aliases for commands. +The keys of the given dictionary are the aliases, while the values are the commands they map to. Type: <> @@ -1694,6 +1695,7 @@ Default: +pass:[true]+ [[content.javascript.log]] === content.javascript.log Log levels to use for JavaScript console logging messages. +When a JavaScript message with the level given in the dictionary key is logged, the corresponding dictionary value selects the qutebrowser logger to use. On QtWebKit, the "unknown" setting is always used. Type: <> @@ -3012,7 +3014,8 @@ Default: [[url.searchengines]] === url.searchengines Definitions of search engines which can be used via the address bar. -The searchengine named `DEFAULT` is used when `url.auto_search` is turned on and something else than a URL was entered to be opened. Other search engines can be used by prepending the search engine name to the search term, e.g. `:open google qutebrowser`. The string `{}` will be replaced by the search term, use `{{` and `}}` for literal `{`/`}` signs. +Maps a searchengine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}` placeholder. The placeholder will be replaced by the search term, use `{{` and `}}` for literal `{`/`}` signs. +The searchengine named `DEFAULT` is used when `url.auto_search` is turned on and something else than a URL was entered to be opened. Other search engines can be used by prepending the search engine name to the search term, e.g. `:open google qutebrowser`. Type: <> diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 516eeaccf..1ff02c3b8 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -15,6 +15,9 @@ aliases: desc: >- Aliases for commands. + The keys of the given dictionary are the aliases, while the values are the + commands they map to. + confirm_quit: type: ConfirmQuit default: [never] @@ -415,6 +418,10 @@ content.javascript.log: desc: >- Log levels to use for JavaScript console logging messages. + When a JavaScript message with the level given in the dictionary key is + logged, the corresponding dictionary value selects the qutebrowser logger to + use. + On QtWebKit, the "unknown" setting is always used. content.javascript.modal_dialog: @@ -1196,11 +1203,14 @@ url.searchengines: desc: >- Definitions of search engines which can be used via the address bar. + Maps a searchengine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}` + placeholder. The placeholder will be replaced by the search term, use `{{` + and `}}` for literal `{`/`}` signs. + The searchengine named `DEFAULT` is used when `url.auto_search` is turned on and something else than a URL was entered to be opened. Other search engines can be used by prepending the search engine name to the search term, e.g. - `:open google qutebrowser`. The string `{}` will be replaced by the search - term, use `{{` and `}}` for literal `{`/`}` signs. + `:open google qutebrowser`. url.start_pages: type: