From b95198673386b072eb4278c8c7d12d249aca6e9d Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 21 May 2021 10:22:39 +0530 Subject: [PATCH] alacritty: Update config to use new regex hints feature --- alacritty/.config/alacritty/alacritty.yml | 58 ++++++++++++++--------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 94859e3..3ba540a 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -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: ",│`|:\"' ()[]{}<>"