From b9dd7ee22e57e65e1baad4959aab8f31d7146246 Mon Sep 17 00:00:00 2001 From: mattia Date: Fri, 13 Aug 2021 14:24:07 +0200 Subject: [PATCH] alacritty.yml: Merge-in https://github.com/alacritty/alacritty/releases/download/v0.9.0/alacritty.yml --- alacritty.yml | 140 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 90 insertions(+), 50 deletions(-) diff --git a/alacritty.yml b/alacritty.yml index 1c186c0..43e43a5 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -195,7 +195,7 @@ colors: # # Colors which should be used to draw the terminal cursor. # - # Allowed values are CellForeground and CellBackground, which reference the + # Allowed values are CellForeground/CellBackground, which reference the # affected cell, or hexadecimal colors like #ff00ff. #cursor: # text: CellBackground @@ -205,7 +205,7 @@ colors: # # Colors for the cursor when the vi mode is active. # - # Allowed values are CellForeground and CellBackground, which reference the + # Allowed values are CellForeground/CellBackground, which reference the # affected cell, or hexadecimal colors like #ff00ff. #vi_mode_cursor: # text: CellBackground @@ -215,19 +215,37 @@ colors: # # Colors used for the search bar and match highlighting. #search: - # Allowed values are CellForeground and CellBackground, which reference the + # Allowed values are CellForeground/CellBackground, which reference the # affected cell, or hexadecimal colors like #ff00ff. #matches: # foreground: '#000000' # background: '#ffffff' #focused_match: - # foreground: CellBackground - # background: CellForeground + # foreground: '#ffffff' + # background: '#000000' #bar: # background: '#c5c8c6' # foreground: '#1d1f21' + # Keyboard regex hints + #hints: + # First character in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #start: + # foreground: '#1d1f21' + # background: '#e9ff5e' + + # All characters after the first one in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #end: + # foreground: '#e9ff5e' + # background: '#1d1f21' + # Line indicator # # Color used for the indicator displaying the position in history during @@ -242,7 +260,7 @@ colors: # # Colors which should be used to draw the selection area. # - # Allowed values are CellForeground and CellBackground, which reference the + # Allowed values are CellForeground/CellBackground, which reference the # affected cell, or hexadecimal colors like #ff00ff. #selection: # text: CellBackground @@ -427,28 +445,49 @@ mouse: # If this is `true`, the cursor is temporarily hidden when typing. hide_when_typing: true - url: - # URL launcher - # - # 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 `launcher: None`, URL launching will be disabled completely. - # - # Default: - # - (macOS) open - # - (Linux/BSD) xdg-open - # - (Windows) explorer - #launcher: - # program: xdg-open - # args: [] +# Regex hints +# +# Terminal hints can be used to find text in the visible part of the terminal +# and pipe it to other applications. +hints: + # Keys used for the hint labels. + #alphabet: "jfkdls;ahgurieowpq" - # URL modifiers - # - # 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 + # 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`, `binding.mode` 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: "(ipfs:|ipns:|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: Control + # binding: + # key: U + # mods: Control|Shift # Mouse bindings # @@ -553,8 +592,8 @@ mouse: # - Vi mode exclusive actions: # # - Open -# Open URLs at the cursor location with the launcher configured in -# `url.launcher`. +# Perform the action of the first matching hint under the vi mode cursor +# with `mouse.enabled` set to `true`. # - ToggleNormalSelection # - ToggleLineSelection # - ToggleBlockSelection @@ -691,11 +730,11 @@ key_bindings: #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } # Vi Mode - #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } + #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } #- { key: Escape, mode: Vi|~Search, action: ClearSelection } - #- { key: I, mode: Vi|~Search, action: ScrollToBottom } #- { key: I, mode: Vi|~Search, action: ToggleViMode } + #- { key: I, mode: Vi|~Search, action: ScrollToBottom } #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } @@ -770,25 +809,26 @@ key_bindings: #- { key: Return, mods: Alt, action: ToggleFullscreen } # (macOS only) - #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } - #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } - #- { key: Key0, mods: Command, action: ResetFontSize } - #- { key: Equals, mods: Command, action: IncreaseFontSize } - #- { key: Plus, mods: Command, action: IncreaseFontSize } - #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } - #- { key: Minus, mods: Command, action: DecreaseFontSize } - #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } - #- { key: V, mods: Command, action: Paste } - #- { key: C, mods: Command, action: Copy } - #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } - #- { key: H, mods: Command, action: Hide } - #- { key: M, mods: Command, action: Minimize } - #- { key: Q, mods: Command, action: Quit } - #- { key: W, mods: Command, action: Quit } - #- { key: N, mods: Command, action: SpawnNewInstance } - #- { key: F, mods: Command|Control, action: ToggleFullscreen } - #- { key: F, mods: Command, mode: ~Search, action: SearchForward } - #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } + #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Plus, mods: Command, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } + #- { key: H, mods: Command, action: Hide } + #- { key: H, mods: Command|Alt, action: HideOtherApplications } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: N, mods: Command, action: SpawnNewInstance } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + #- { key: F, mods: Command, mode: ~Search, action: SearchForward } + #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } # Custom - { key: F11, action: ToggleFullscreen }