Update docs and fix style
This commit is contained in:
parent
9d09aa1b40
commit
87dffa5afc
@ -36,13 +36,13 @@ It is possible to run or bind multiple commands by separating them with `;;`.
|
|||||||
|<<clear-messages,clear-messages>>|Clear all message notifications.
|
|<<clear-messages,clear-messages>>|Clear all message notifications.
|
||||||
|<<click-element,click-element>>|Click the element matching the given filter.
|
|<<click-element,click-element>>|Click the element matching the given filter.
|
||||||
|<<close,close>>|Close the current window.
|
|<<close,close>>|Close the current window.
|
||||||
|<<config-add-dict,config-add-dict>>|Add a key/value pair to a dictionary option.
|
|
||||||
|<<config-add-list,config-add-list>>|Append a value to a config option that is a list.
|
|
||||||
|<<config-clear,config-clear>>|Set all settings back to their default.
|
|<<config-clear,config-clear>>|Set all settings back to their default.
|
||||||
|<<config-cycle,config-cycle>>|Cycle an option between multiple values.
|
|<<config-cycle,config-cycle>>|Cycle an option between multiple values.
|
||||||
|
|<<config-dict-add,config-dict-add>>|Add a key/value pair to a dictionary option.
|
||||||
|
|<<config-dict-remove,config-dict-remove>>|Remove a key from a dict.
|
||||||
|<<config-edit,config-edit>>|Open the config.py file in the editor.
|
|<<config-edit,config-edit>>|Open the config.py file in the editor.
|
||||||
|<<config-remove-dict,config-remove-dict>>|Remove a key from a dict.
|
|<<config-list-add,config-list-add>>|Append a value to a config option that is a list.
|
||||||
|<<config-remove-list,config-remove-list>>|Remove a value from a list.
|
|<<config-list-remove,config-list-remove>>|Remove a value from a list.
|
||||||
|<<config-source,config-source>>|Read a config.py file.
|
|<<config-source,config-source>>|Read a config.py file.
|
||||||
|<<config-unset,config-unset>>|Unset an option.
|
|<<config-unset,config-unset>>|Unset an option.
|
||||||
|<<config-write-py,config-write-py>>|Write the current configuration to a config.py file.
|
|<<config-write-py,config-write-py>>|Write the current configuration to a config.py file.
|
||||||
@ -270,35 +270,6 @@ The given filter needs to result in exactly one element, otherwise, an error is
|
|||||||
=== close
|
=== close
|
||||||
Close the current window.
|
Close the current window.
|
||||||
|
|
||||||
[[config-add-dict]]
|
|
||||||
=== config-add-dict
|
|
||||||
Syntax: +:config-add-dict [*--temp*] [*--replace*] 'option' 'key' 'value'+
|
|
||||||
|
|
||||||
Add a key/value pair to a dictionary option.
|
|
||||||
|
|
||||||
==== positional arguments
|
|
||||||
* +'option'+: The name of the option.
|
|
||||||
* +'key'+: The key to use.
|
|
||||||
* +'value'+: The value to place in the dictionary.
|
|
||||||
|
|
||||||
==== optional arguments
|
|
||||||
* +*-t*+, +*--temp*+: Add value temporarily until qutebrowser is closed.
|
|
||||||
* +*-r*+, +*--replace*+: Replace existing values. By default, existing values are not overwritten.
|
|
||||||
|
|
||||||
|
|
||||||
[[config-add-list]]
|
|
||||||
=== config-add-list
|
|
||||||
Syntax: +:config-add-list [*--temp*] 'option' 'value'+
|
|
||||||
|
|
||||||
Append a value to a config option that is a list.
|
|
||||||
|
|
||||||
==== positional arguments
|
|
||||||
* +'option'+: The name of the option.
|
|
||||||
* +'value'+: The value to append to the end of the list.
|
|
||||||
|
|
||||||
==== optional arguments
|
|
||||||
* +*-t*+, +*--temp*+: Add value temporarily until qutebrowser is closed.
|
|
||||||
|
|
||||||
[[config-clear]]
|
[[config-clear]]
|
||||||
=== config-clear
|
=== config-clear
|
||||||
Syntax: +:config-clear [*--save*]+
|
Syntax: +:config-clear [*--save*]+
|
||||||
@ -325,18 +296,25 @@ Cycle an option between multiple values.
|
|||||||
* +*-t*+, +*--temp*+: Set value temporarily until qutebrowser is closed.
|
* +*-t*+, +*--temp*+: Set value temporarily until qutebrowser is closed.
|
||||||
* +*-p*+, +*--print*+: Print the value after setting.
|
* +*-p*+, +*--print*+: Print the value after setting.
|
||||||
|
|
||||||
[[config-edit]]
|
[[config-dict-add]]
|
||||||
=== config-edit
|
=== config-dict-add
|
||||||
Syntax: +:config-edit [*--no-source*]+
|
Syntax: +:config-dict-add [*--temp*] [*--replace*] 'option' 'key' 'value'+
|
||||||
|
|
||||||
Open the config.py file in the editor.
|
Add a key/value pair to a dictionary option.
|
||||||
|
|
||||||
|
==== positional arguments
|
||||||
|
* +'option'+: The name of the option.
|
||||||
|
* +'key'+: The key to use.
|
||||||
|
* +'value'+: The value to place in the dictionary.
|
||||||
|
|
||||||
==== optional arguments
|
==== optional arguments
|
||||||
* +*-n*+, +*--no-source*+: Don't re-source the config file after editing.
|
* +*-t*+, +*--temp*+: Add value temporarily until qutebrowser is closed.
|
||||||
|
* +*-r*+, +*--replace*+: Replace existing values. By default, existing values are not overwritten.
|
||||||
|
|
||||||
[[config-remove-dict]]
|
|
||||||
=== config-remove-dict
|
[[config-dict-remove]]
|
||||||
Syntax: +:config-remove-dict [*--temp*] 'option' 'key'+
|
=== config-dict-remove
|
||||||
|
Syntax: +:config-dict-remove [*--temp*] 'option' 'key'+
|
||||||
|
|
||||||
Remove a key from a dict.
|
Remove a key from a dict.
|
||||||
|
|
||||||
@ -347,9 +325,31 @@ Remove a key from a dict.
|
|||||||
==== optional arguments
|
==== optional arguments
|
||||||
* +*-t*+, +*--temp*+: Remove value temporarily until qutebrowser is closed.
|
* +*-t*+, +*--temp*+: Remove value temporarily until qutebrowser is closed.
|
||||||
|
|
||||||
[[config-remove-list]]
|
[[config-edit]]
|
||||||
=== config-remove-list
|
=== config-edit
|
||||||
Syntax: +:config-remove-list [*--temp*] 'option' 'value'+
|
Syntax: +:config-edit [*--no-source*]+
|
||||||
|
|
||||||
|
Open the config.py file in the editor.
|
||||||
|
|
||||||
|
==== optional arguments
|
||||||
|
* +*-n*+, +*--no-source*+: Don't re-source the config file after editing.
|
||||||
|
|
||||||
|
[[config-list-add]]
|
||||||
|
=== config-list-add
|
||||||
|
Syntax: +:config-list-add [*--temp*] 'option' 'value'+
|
||||||
|
|
||||||
|
Append a value to a config option that is a list.
|
||||||
|
|
||||||
|
==== positional arguments
|
||||||
|
* +'option'+: The name of the option.
|
||||||
|
* +'value'+: The value to append to the end of the list.
|
||||||
|
|
||||||
|
==== optional arguments
|
||||||
|
* +*-t*+, +*--temp*+: Add value temporarily until qutebrowser is closed.
|
||||||
|
|
||||||
|
[[config-list-remove]]
|
||||||
|
=== config-list-remove
|
||||||
|
Syntax: +:config-list-remove [*--temp*] 'option' 'value'+
|
||||||
|
|
||||||
Remove a value from a list.
|
Remove a value from a list.
|
||||||
|
|
||||||
|
@ -754,7 +754,6 @@ class HintManager(QObject):
|
|||||||
self._context.tab.elements.find_css(selector, self._start_cb,
|
self._context.tab.elements.find_css(selector, self._start_cb,
|
||||||
only_visible=True)
|
only_visible=True)
|
||||||
|
|
||||||
|
|
||||||
def _get_hint_mode(self, mode):
|
def _get_hint_mode(self, mode):
|
||||||
"""Get the hinting mode to use based on a mode argument."""
|
"""Get the hinting mode to use based on a mode argument."""
|
||||||
if mode is None:
|
if mode is None:
|
||||||
|
@ -44,15 +44,15 @@ def customized_option(*, info):
|
|||||||
|
|
||||||
def list_option(*, info):
|
def list_option(*, info):
|
||||||
"""A CompletionModel filled with settings whose values are lists."""
|
"""A CompletionModel filled with settings whose values are lists."""
|
||||||
predicate = lambda opt: (isinstance(info.config.get_obj(opt.name), list)
|
predicate = lambda opt: (isinstance(info.config.get_obj(opt.name),
|
||||||
and not opt.no_autoconfig)
|
list) and not opt.no_autoconfig)
|
||||||
return _option(info, "List options", predicate)
|
return _option(info, "List options", predicate)
|
||||||
|
|
||||||
|
|
||||||
def dict_option(*, info):
|
def dict_option(*, info):
|
||||||
"""A CompletionModel filled with settings whose values are dicts."""
|
"""A CompletionModel filled with settings whose values are dicts."""
|
||||||
predicate = lambda opt: (isinstance(info.config.get_obj(opt.name), dict)
|
predicate = lambda opt: (isinstance(info.config.get_obj(opt.name),
|
||||||
and not opt.no_autoconfig)
|
dict) and not opt.no_autoconfig)
|
||||||
return _option(info, "Dict options", predicate)
|
return _option(info, "Dict options", predicate)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user