Privian comes with a default set of bangs (from DuckDuckGo), but you can customize them using the bangs
configuration option.
add
- (object) Custom bangs, see object example belowblacklist
- (string[]) Bangs that should not be availableenable
- (boolean) whether to enable bangswhitelist
- (string[]) Bangs that should be available (use either blacklist or whitelist, not both)Adding a custom bang:
{
"bangs": {
"add": {
"!custom": {
"label": "Custom bang",
"priority": 0,
"url": "https://example.com/search?q=%s"
}
}
}
}
Configures search and preview providers.
Supported search and suggestions providers:
Supported preview providers:
Imdb
Mdn
StackOverflow
Wikipedia
The Google provider can be configured to handle 429
status codes (captchas) with puppeteer. If you enable this features by providing the executablePath
, it will open a browser window when Google requests captcha.
executablePath
(string) - The path to the broswer executable (you can find yours using chrome://version/
)Privian caches various data such as suggestions, search results, and previews. By default, the data is stored in-memory using LRU cache. You can enable redis instead by providing the redis connection URL.
cache
:brotli
(boolean) - whether to compress data using BrotlihashKey
(boolean) - whether to hash key using SHA1url
(string) - connection string as redis://127.0.0.1:6379
config.json
{
"bangs": {
"add": null,
"blacklist": null,
"enable": true,
"whitelist": null
},
"providers": {
"load": [
"BingApi",
"Brave",
"Google",
"Calculator",
"Currency"
],
"preview": [
"Imdb",
"Mdn",
"StackOverflow",
"Wikipedia"
],
"search": [
"Google",
"Calculator",
"Currency"
],
"suggestions": [
"Google"
]
},
"puppeteer": {
"executablePath": ""
},
"redis": {
"cache": {
"brotli": true,
"hashKey": true
},
"url": ""
}
}