diff --git a/docs/configuring.md b/docs/configuring.md index 62b876f7ab..c75aae0e95 100644 --- a/docs/configuring.md +++ b/docs/configuring.md @@ -219,6 +219,7 @@ For more info, see the **[Authentication Docs](/docs/authentication.md)** **`customSearchEngine`** | `string` | _Optional_ | You can also use a custom search engine, or your own self-hosted instance. This requires `searchEngine: custom` to be set. Then add the URL of your service, with GET query string included here **`openingMethod`** | `string` | _Optional_ | Set your preferred opening method for search results: `newtab`, `sametab`, `workspace`. Defaults to `newtab` **`searchBangs`** | `object` | _Optional_ | A key-value-pair set of custom search _bangs_ for redirecting query to a specific app or search engine. The key of each should be the bang you will type (typically starting with `/`, `!` or `:`), and value is the destination, either as a search engine key (e.g. `reddit`) or a URL with search parameters (e.g. `https://en.wikipedia.org/w/?search=`) +**`openUrlsDirectly`** | `boolean` | _Optional_ | If `true`, queries that look like URLs will be opened directly instead of searched. Defaults to `false` **[⬆️ Back to Top](#configuring)** diff --git a/docs/searching.md b/docs/searching.md index 6595950cda..63a9e29679 100644 --- a/docs/searching.md +++ b/docs/searching.md @@ -114,6 +114,18 @@ appConfig: webSearch: { disableWebSearch: true } ``` +### Opening URLs Directly + +When enabled, if your search query looks like a URL (e.g. `github.com`, `https://example.org/path`), pressing Enter will navigate directly to that URL instead of searching for it. + +Set `appConfig.webSearch.openUrlsDirectly` to `true`: + +```yaml +appConfig: + webSearch: + openUrlsDirectly: true +``` + ## Clearing Search You can clear your search term at any time, resting the UI to it's initial state, by pressing Esc. diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index e257b64e7a..e2edc75ef6 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -8,7 +8,8 @@ "search-label": "Search", "search-placeholder": "Start typing to filter", "clear-search-tooltip": "Clear Search", - "enter-to-search-web": "Press enter to search the web" + "enter-to-search-web": "Press enter to search the web", + "enter-to-open-url": "Press enter to open URL" }, "splash-screen": { "loading": "Loading" diff --git a/src/components/Settings/SearchBar.vue b/src/components/Settings/SearchBar.vue index 42d7cc775f..036243e7b5 100644 --- a/src/components/Settings/SearchBar.vue +++ b/src/components/Settings/SearchBar.vue @@ -9,8 +9,8 @@ :placeholder="$t('search.search-placeholder')" v-on:input="userIsTypingSomething" @keydown.esc="clearFilterInput" /> -
- {{ $t('search.enter-to-search-web') }} +
+ {{ searchNote }}
diff --git a/src/utils/ConfigSchema.json b/src/utils/ConfigSchema.json index 92039798ab..4346d9b3c7 100644 --- a/src/utils/ConfigSchema.json +++ b/src/utils/ConfigSchema.json @@ -351,6 +351,12 @@ "default": "false", "description": "If set to true, web search will be disabled all together" }, + "openUrlsDirectly": { + "title": "Open URLs Directly", + "type": "boolean", + "default": false, + "description": "If enabled, when the search query looks like a URL it will be opened directly instead of being passed to the search engine" + }, "searchEngine": { "title": "Search Engine", "type": "string",