mirror of https://github.com/searxng/searxng.git
[mod] add hotkeys option to settings.yml
The change in the hotkey mechanism introduced in 317db5b04
does not allow
configuration via `settings.yml`. This commit adds that functionality.
Closes: #2898
This commit is contained in:
parent
ff78b1a902
commit
5d53aac20f
|
@ -20,6 +20,7 @@
|
||||||
theme_args:
|
theme_args:
|
||||||
simple_style: auto
|
simple_style: auto
|
||||||
search_on_category_select: true
|
search_on_category_select: true
|
||||||
|
hotkeys: default
|
||||||
|
|
||||||
.. _static_use_hash:
|
.. _static_use_hash:
|
||||||
|
|
||||||
|
@ -64,3 +65,6 @@
|
||||||
|
|
||||||
``search_on_category_select``:
|
``search_on_category_select``:
|
||||||
Perform search immediately if a category selected. Disable to select multiple categories.
|
Perform search immediately if a category selected. Disable to select multiple categories.
|
||||||
|
|
||||||
|
``hotkeys``:
|
||||||
|
Hotkeys to use in the search interface: ``default``, ``vim`` (Vim-like).
|
||||||
|
|
|
@ -466,7 +466,7 @@ class Preferences:
|
||||||
locked=is_locked('search_on_category_select')
|
locked=is_locked('search_on_category_select')
|
||||||
),
|
),
|
||||||
'hotkeys': EnumStringSetting(
|
'hotkeys': EnumStringSetting(
|
||||||
'default',
|
settings['ui']['hotkeys'],
|
||||||
choices=['default', 'vim']
|
choices=['default', 'vim']
|
||||||
),
|
),
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
|
@ -127,6 +127,8 @@ ui:
|
||||||
# Perform search immediately if a category selected.
|
# Perform search immediately if a category selected.
|
||||||
# Disable to select multiple categories at once and start the search manually.
|
# Disable to select multiple categories at once and start the search manually.
|
||||||
search_on_category_select: true
|
search_on_category_select: true
|
||||||
|
# Hotkeys: default or vim
|
||||||
|
hotkeys: default
|
||||||
|
|
||||||
# Lock arbitrary settings on the preferences page. To find the ID of the user
|
# Lock arbitrary settings on the preferences page. To find the ID of the user
|
||||||
# setting you want to lock, check the ID of the form on the page "preferences".
|
# setting you want to lock, check the ID of the form on the page "preferences".
|
||||||
|
|
|
@ -201,6 +201,7 @@ SCHEMA = {
|
||||||
'infinite_scroll': SettingsValue(bool, False),
|
'infinite_scroll': SettingsValue(bool, False),
|
||||||
'cache_url': SettingsValue(str, 'https://web.archive.org/web/'),
|
'cache_url': SettingsValue(str, 'https://web.archive.org/web/'),
|
||||||
'search_on_category_select': SettingsValue(bool, True),
|
'search_on_category_select': SettingsValue(bool, True),
|
||||||
|
'hotkeys': SettingsValue(('default', 'vim'), 'default'),
|
||||||
},
|
},
|
||||||
'preferences': {
|
'preferences': {
|
||||||
'lock': SettingsValue(list, []),
|
'lock': SettingsValue(list, []),
|
||||||
|
|
Loading…
Reference in New Issue