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
1 changed files with 36 additions and 22 deletions

View File

@ -242,28 +242,42 @@ mouse:
# If this is `true`, the cursor is temporarily hidden when typing.
hide_when_typing: true
# URL launcher
# url:
# 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.
#
# Default:
# - (macOS) open
# - (Linux) xdg-open
# - (Windows) explorer
# launcher:
# program: xdg-open
# args: []
# These are the modifiers that need to be held down for opening URLs when clicking
# on them. The available modifiers are documented in the key binding section.
# modifiers: Control|Shift
url:
launcher:
program: xdg-open
modifiers: Control
hints:
# List with all available hints
#
# Each hint must have a `regex` and either an `action` or a `command` field.
# The fields `mouse`, `binding` and `post_processing` are optional.
#
# The fields `command`, `binding.key`, `binding.mods` and `mouse.mods` accept
# the same values as they do in the `key_bindings` section.
#
# The `mouse.enabled` field controls if the hint should be underlined while
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
#
# 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
# (e.g. a trailing `.`). This is most useful for URIs.
#
# Values for `action`:
# - Copy
# Copy the hint's text to the clipboard.
# - Paste
# 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:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"