alacritty: Update config to use new regex hints feature

This commit is contained in:
Sanchayan Maity 2021-05-21 10:22:39 +05:30
parent 847dd90e2d
commit b951986733

View file

@ -242,28 +242,42 @@ mouse:
# If this is `true`, the cursor is temporarily hidden when typing. # If this is `true`, the cursor is temporarily hidden when typing.
hide_when_typing: true hide_when_typing: true
# URL launcher hints:
# url: # List with all available hints
# This program is executed when clicking on a text which is recognized as a URL.
# The URL is always added to the command as the last parameter.
# #
# When set to `None`, URL launching will be disabled completely. # Each hint must have a `regex` and either an `action` or a `command` field.
# The fields `mouse`, `binding` and `post_processing` are optional.
# #
# Default: # The fields `command`, `binding.key`, `binding.mods` and `mouse.mods` accept
# - (macOS) open # the same values as they do in the `key_bindings` section.
# - (Linux) xdg-open #
# - (Windows) explorer # The `mouse.enabled` field controls if the hint should be underlined while
# launcher: # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
# program: xdg-open #
# args: [] # If the `post_processing` field is set to `true`, heuristics will be used to
# shorten the match if there are characters likely not to be part of the hint
# These are the modifiers that need to be held down for opening URLs when clicking # (e.g. a trailing `.`). This is most useful for URIs.
# on them. The available modifiers are documented in the key binding section. #
# modifiers: Control|Shift # Values for `action`:
url: # - Copy
launcher: # Copy the hint's text to the clipboard.
program: xdg-open # - Paste
modifiers: Control # Paste the hint's text to the terminal or search.
# - Select
# Select the hint's text.
# - MoveViModeCursor
# Move the vi mode cursor to the beginning of the hint.
enabled:
- regex: "(magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
command: xdg-open
post_processing: true
mouse:
enabled: true
mods: None
binding:
key: U
mods: Control|Shift
selection: selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>" semantic_escape_chars: ",│`|:\"' ()[]{}<>"