gravel_core::config

Constant DEFAULT_CONFIG

source
pub const DEFAULT_CONFIG: &str = "## Default configuration for gravel\n##\n## Indentation is important! Check https://yaml.org/ if you\'re unfamiliar.\n##\n## Put this configuration in ~/.config/gravel/config.yml.\n## Ommitted keys are set to sensible defaults, so you only\n## need to keep what you want to change.\n##\n## Additionally, you can add ~/.config/gravel/platform/linux.yml (or windows)\n## to overwrite your normal config with platform-specific changes. Again, you\n## only need to specify what you want to change relative to your main config.\n##\n## Finally, you can add ~/.config/gravel/host/yourhostname.yml\n## for host-specific changes. This works like the others, but trumps them.\n\n## Configures the key for single-instance functionality.\n## Set to null to disable.\nsingle_instance: gravel\n\n## Governs if external plugin libraries are loaded.\n## Libraries are discovered in ~/.local/share/gravel/plugins/*.{so,dll}\n## as well as in $XDG_DATA_DIRS with the same structure.\n##\n## Valid values are `disabled`, `all` and `whitelist` (see below)\nexternal_plugins: disabled\n\n## Filters libraries by their filename, sans extension. Absolute paths *do not*\n## work, the library must still be placed in one of the supported folders.\n# external_plugins:\n#   whitelist:\n#     - libgravel_provider_calculator\n#     - my_fancy_plugin\n\n## Binds global hotkeys to actions.\n## The hotkey is configured as an emacs-like binding, though note that some\n## features, such as chords, are not supported.\n##\n## Binding examples:\n##   `A-<Space>` => Alt + Space\n##   `C-M-s` => Control + Super/Windows + S\n##   `a` => A\n##\n## A complete list of supported modifiers and keys can be found here:\n## https://github.com/thorio/gravel/blob/master/gravel-core/src/hotkeys/structs.rs\nhotkeys:\n\n  ## Shows or hides the frontend. These actions are also available seperately,\n  ## as `show` and `hide`\n  - binding: A-<Space>\n    action: show_hide\n\n  ## Shows the frontend and pre-populates with the given query.\n  # - binding: M-r\n  #   action:\n  #     show_with: example\n\n## Frontend, or UI, to use. This is responsible for the elements you\n## interact with.\nfrontend:\n\n  ## The default FLTK-based frontend.\n  plugin: fltk\n\n  ## https://github.com/thorio/gravel/tree/master/gravel-frontend-fltk\n  # config:\n  #   ## Layout and sizing configuration.\n  #   layout:\n  #\n  #     ## Scales all sizes by this factor. Useful for high DPI monitors.\n  #     scale: 1.0\n  #\n  #     ## Then maximum number of hits shown on screen. Any less and the window\n  #     ## will shrink, any more and you will be able to scroll down the list.\n  #     max_hits: 6\n  #\n  #     ## Total window width. All other widths are calculated relative to this.\n  #     window_width: 800\n  #\n  #     ## Whether to draw a thin, black border around the window.\n  #     window_border: false\n  #\n  #     ## Whether to draw window decorations (title bar, close button, etc.).\n  #     window_decorations: false\n  #\n  #     ## These are some more specific values you usually don\'t need to change.\n  #     hit_title_height: 30\n  #     hit_title_font_size: 20\n  #     hit_subtitle_height: 20\n  #     hit_subtitle_font_size: 12\n  #     query_font_size: 25\n  #     scrollbar_width: 10\n  #     scrollbar_padding: 3\n  #     padding: 8\n  #\n  #   ## Color configuration. Use the hex color: `0xRRGGBB`.\n  #   ## Google has a color picker if you search for, well, \"color picker\".\n  #   colors:\n  #     background: 0x202020\n  #     query_text: 0xffffff\n  #     query_cursor: 0xbf6c0d\n  #     query_highlight: 0xbf6c0d\n  #     query_background: 0x202020\n  #     hit_title: 0xffffff\n  #     hit_subtitle: 0xffffff\n  #     hit_highlight: 0xbf6c0d\n  #     scrollbar: 0xbf6c0d\n  #\n  #   behaviour:\n  #\n  #     ## Whether or not to show the window when starting gravel\n  #     start_hidden: false\n  #\n  #     ## Automatically hides the window when it loses focus.\n  #     auto_hide: false\n  #\n  #     ## Exits the application instead of hiding the window.\n  #     ## Requires external solution to start gravel when desired.\n  #     exit_on_hide: false\n  #\n  #     ## Time in milliseconds after hiding in which show requests\n  #     ## should be ignored. This is a workaround for weird behaviour\n  #     ## in X11 where hotkeys steal focus.\n  #     window_hide_debounce: 200\n  #\n  #     ## Automatically centers the window on the screen each time it is shown.\n  #     auto_center_window: true\n  #\n  #     ## Shows the internal score assigned to each hit,\n  #     ## useful for debugging purposes.\n  #     show_scores: false\n\n## Providers to use. These are responsible for the results you get.\n## Providers each yield different sets of results, so if you need more or\n## less functionality, you can configure this here.\n## Each provider is referenced by the name of their plugin, and can be added\n## to your configuration multiple times.\nproviders:\n\n  ## Default calculator. If it detects a mathematical expression, such as\n  ## `1 + 2` or `5 * sin(3)`, it will display its result at the very top of\n  ## the list and allow you to copy the value to your clipboard.\n  ##\n  ## A complete list of supported expressions and constants can be found here:\n  ## https://docs.rs/mexprp/latest/mexprp/struct.Context.html#builtin\n  - plugin: calculator\n\n    ## https://github.com/thorio/gravel/tree/master/gravel-provider-calculator\n    # config:\n    #   ## Changes the subtitle of the hit. Visual difference only.\n    #   subtitle: Copy to Clipboard\n\n  ## Default application finder. It will search the applications installed on\n  ## your system and allow you to launch them.\n  ##\n  ## On Linux this will search your desktop entries,\n  ## on Windows it will search the Start menu.\n  - plugin: program\n\n    ## https://github.com/thorio/gravel/tree/master/gravel-provider-program\n    # config:\n    #   ## On linux, paths can be configured by changing the\n    #   ## XDG_DATA_DIRS environment variable.\n    #\n    #   ## Where to look for symlinks on Windows.\n    #   ## Paths should be specified as globs.\n    #   windows:\n    #     shortcut_paths:\n    #       - \"$ProgramData\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\**\\\\*.lnk\"\n    #       - \"$APPDATA\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\**\\\\*.lnk\"\n\n  ## Default web searcher. It will always insert a result at the very bottom of\n  ## the list that, when selected, will search the web for your query.\n  - plugin: websearch\n\n    ## https://github.com/thorio/gravel/tree/master/gravel-provider-websearch\n    # config:\n    #   ## Determines which URL is opened. The default is Google Search.\n    #   ## The placeholder `{}` is replaced with the URL-encoded query.\n    #   ##\n    #   ## For example, you could use:\n    #   ## - `https://duckduckgo.com/?q={}`\n    #   ## - `https://www.ecosia.org/search?q={}`\n    #   ## - `https://www.bing.com/search?q={}`\n    #   ## - `https://search.yahoo.com/search?p={}`\n    #   ##\n    #   url_pattern: \"https://www.google.com/search?q={}\"\n    #\n    #   ## Changes the subtitle of the hit. Visual difference only.\n    #   subtitle: Web Search\n\n  ## This is a second instance of the previous web search provider.\n  ## It\'s set up to open the query in Google Translate and is\n  ## only used when you prefix your query with \"tr\".\n  - plugin: websearch\n    keyword: tr\n    config:\n      url_pattern: \"https://translate.google.com/?text={}\"\n      subtitle: Translate\n\n  ## System provider.\n  ## Provides system commands such as shutdown, log out or exiting gravel.\n  - plugin: system\n\n    ## https://github.com/thorio/gravel/tree/master/gravel-provider-system\n    # config:\n    #   ## Below are configurable titles and subtitles for each command.\n    #   ## Linux systems can additionally configure a bash commmand to be run.\n    #   ## On Windows systems, the native API is used instead.\n    #\n    #   exit:\n    #     title: exit\n    #     subtitle: Exit gravel\n    #\n    #   reload:\n    #     title: reload\n    #     subtitle: Reload gravel\n    #\n    #   clear_caches:\n    #     title: clear caches\n    #     subtitle: Clear frontend and provider caches\n    #\n    #   lock:\n    #     title: lock\n    #     subtitle: Lock the System\n    #\n    #     ## Specifies the to bash command to run on linux systems.\n    #     command_linux: loginctl lock-session\n    #\n    #   logout:\n    #     title: log out\n    #     subtitle: Close the current session\n    #     command_linux: loginctl terminate-session $(loginctl session-status | awk \'NR==1{print $1}\')\n    #\n    #   restart:\n    #     title: restart\n    #     subtitle: Restart the System\n    #     command_linux: shutdown -r now\n    #\n    #   shutdown:\n    #     title: shutdown\n    #     subtitle: Shut the System down\n    #     command_linux: shutdown now\n    #\n    #   sleep:\n    #     title: sleep\n    #     subtitle: Put the System to sleep\n    #     command_linux: systemctl suspend\n\n  ## Process killer.\n  ## Lists running processes on your system and allows you to kill them.\n  ## There is currently no further configuration for this plugin.\n  - plugin: kill\n\n    ## This option disables the provider for any query that is not prefixed\n    ## with this keyword, then shows only this providers results for any\n    ## query that is. You can use it with any provider.\n    keyword: kill\n\n  ## Command runner.\n  ## Runs the given command with either sh on Linux,\n  ## or ShellExecute on Windows.\n  - plugin: exec\n    keyword: \">\"\n\n    ## https://github.com/thorio/gravel/tree/master/gravel-provider-exec\n    # config:\n    #   ## Changes the subtitle of the hit. Visual difference only.\n    #   subtitle: Run Command\n\n  ## Tool for creating your own hits.\n  # - plugin: custom\n  #   config:\n  #     ## The configuration of this provider is a bit more in-depth,\n  #     ## so please refer to the documentation:\n  #     ## https://thorio.github.io/gravel/docs/gravel_provider_custom\n  #     hits:\n  #       - title: say hello\n  #         action: \"echo hello from bash\"\n";