Wrigs

Alacritty Config File

May 8th, 2021 (edited)
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 18.07 KB | None | 0 0
  1. #   _    _      _       _             _            _    
  2. #  | |  | |    (_)     | |           | |          | |    
  3. #  | |  | |_ __ _  __ _| | ___ _   _ | |_ ___  ___| |__  
  4. #  | |/\| | '__| |/ _` | |/ _ \ | | || __/ _ \/ __| '_ \
  5. #  \  /\  / |  | | (_| | |  __/ |_| || ||  __/ (__| | | |
  6. #   \/  \/|_|  |_|\__, |_|\___|\__, (_)__\___|\___|_| |_|
  7. #                  __/ |        __/ |                    
  8. #                 |___/        |___/                    
  9.  
  10. # Configuration for Alacritty, the GPU enhanced terminal emulator.
  11. # My config file is a modified version of Derek Taylor's config.
  12. # https://gitlab.com/dwt1/dotfiles/-/tree/master/.config/alacritty
  13. # Last updated:  May 8, 2021
  14.  
  15. # Any items in the `env` entry below will be added as
  16. # environment variables. Some entries may override variables
  17. # set by alacritty itself.
  18. env:
  19.  # TERM variable
  20.   #
  21.   # This value is used to set the `$TERM` environment variable for
  22.   # each instance of Alacritty. If it is not present, alacritty will
  23.   # check the local terminfo database and use `alacritty` if it is
  24.   # available, otherwise `xterm-256color` is used.
  25.   TERM: xterm-256color
  26.  
  27. window:
  28.  # Window dimensions (changes require restart)
  29.   #
  30.   # Specified in number of columns/lines, not pixels.
  31.   # If both are `0`, this setting is ignored.
  32.   dimensions:
  33.     columns: 120
  34.     lines: 40
  35.  
  36.   # Window position (changes require restart)
  37.   #
  38.   # Specified in number of pixels.
  39.   # If the position is not set, the window manager will handle the placement.
  40.   #position:
  41.   #  x: 0
  42.   #  y: 0
  43.  
  44.   # Window padding (changes require restart)
  45.   #
  46.   # Blank space added around the window in pixels. This padding is scaled
  47.   # by DPI and the specified value is always added at both opposing sides.
  48.   padding:
  49.     x: 10
  50.     y: 10
  51.  
  52.   # Spread additional padding evenly around the terminal content.
  53.   dynamic_padding: false
  54.  
  55.   # Window decorations
  56.   #
  57.   # Values for `decorations`:
  58.   #     - full: Borders and title bar
  59.   #     - none: Neither borders nor title bar
  60.   #
  61.   # Values for `decorations` (macOS only):
  62.   #     - transparent: Title bar, transparent background and title bar buttons
  63.   #     - buttonless: Title bar, transparent background, but no title bar buttons
  64.   #decorations: full
  65.  
  66.   # Startup Mode (changes require restart)
  67.   #
  68.   # Values for `startup_mode`:
  69.   #   - Windowed
  70.   #   - Maximized
  71.   #   - Fullscreen
  72.   #
  73.   # Values for `startup_mode` (macOS only):
  74.   #   - SimpleFullscreen
  75.   #startup_mode: Windowed
  76.  
  77.   # Window title
  78.   title: Alacritty
  79.  
  80.   # Window class (Linux/BSD only):
  81.   class:
  82.    # Application instance name
  83.     instance: Alacritty
  84.     # General application class
  85.     general: Alacritty
  86.  
  87.   # GTK theme variant (Linux/BSD only)
  88.   #
  89.   # Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
  90.   # Set this to `None` to use the default theme variant.
  91.   #gtk_theme_variant: None
  92.  
  93. scrolling:
  94.  # Maximum number of lines in the scrollback buffer.
  95.   # Specifying '0' will disable scrolling.
  96.   history: 5000
  97.  
  98.   # Number of lines the viewport will move for every line scrolled when
  99.   # scrollback is enabled (history > 0).
  100.   #multiplier: 3
  101.  
  102.   # Scroll to the bottom when new text is written to the terminal.
  103.   #auto_scroll: false
  104.  
  105. # Spaces per Tab (changes require restart)
  106. #
  107. # This setting defines the width of a tab in cells.
  108. #
  109. # Some applications, like Emacs, rely on knowing about the width of a tab.
  110. # To prevent unexpected behavior in these applications, it's also required to
  111. # change the `it` value in terminfo when altering this setting.
  112. #tabspaces: 8
  113.  
  114. # Font configuration
  115. font:
  116.  # Normal (roman) font face
  117.   normal:
  118.    # Font family
  119.     #
  120.     # Default:
  121.     #   - (macOS) Menlo
  122.     #   - (Linux/BSD) monospace
  123.     #   - (Windows) Consolas
  124.     # family: Source Code Pro
  125.     # family: CodeNewRoman Nerd Font
  126.     # family: RobotoMono Nerd Font
  127.     # family: Hack
  128.     # family: JetBrains Mono
  129.     # family: UbuntuMono Nerd Font
  130.     # family: Monofur Nerd Font
  131.     # family: TerminessTTF Nerd Font
  132.     # family: Mononoki Nerd Font
  133.     family: Fira Code Retina
  134.  
  135.     # The `style` can be specified to pick a specific face.
  136.     style: Regular
  137.  
  138.   # Bold font face
  139.   bold:
  140.    # Font family
  141.     #
  142.     # If the bold family is not specified, it will fall back to the
  143.     # value specified for the normal font.
  144.     # family: Source Code Pro
  145.     # family: CodeNewRoman Nerd Font
  146.     # family: RobotoMono Nerd Font
  147.     # family: Hack
  148.     # family: JetBrains Mono
  149.     # family: UbuntuMono Nerd Font
  150.     # family: Monofur Nerd Font
  151.     # family: TerminessTTF Nerd Font
  152.     # family: Mononoki Nerd Font
  153.     family: Fira Code Retina
  154.  
  155.     # The `style` can be specified to pick a specific face.
  156.     style: Bold
  157.  
  158.   # Italic font face
  159.   italic:
  160.    # Font family
  161.     #
  162.     # If the italic family is not specified, it will fall back to the
  163.     # value specified for the normal font.
  164.     # family: Source Code Pro
  165.     # family: CodeNewRoman Nerd Font
  166.     # family: RobotoMono Nerd Font
  167.     # family: Hack
  168.     # family: JetBrains Mono
  169.     # family: UbuntuMono Nerd Font
  170.     # family: Monofuritalic Nerd Font Mono
  171.     # family: TerminessTTF Nerd Font
  172.     # family: Mononoki Nerd Font
  173.     family: Fira Code Retina
  174.  
  175.     # The `style` can be specified to pick a specific face.
  176.     style: Italic
  177.  
  178.   # Bold italic font face
  179.   bold_italic:
  180.    # Font family
  181.     #
  182.     # If the bold italic family is not specified, it will fall back to the
  183.     # value specified for the normal font.
  184.     # family: Source Code Pro
  185.     # family: CodeNewRoman Nerd Font
  186.     # family: RobotoMono Nerd Font
  187.     # family: Hack
  188.     # family: JetBrains Mono
  189.     # family: UbuntuMono Nerd Font
  190.     # family: Monofuritalic Nerd Font Mono
  191.     # family: TerminessTTF Nerd Font
  192.     # family: Mononoki Nerd Font
  193.     family: Fira Code Retina
  194.  
  195.     # The `style` can be specified to pick a specific face.
  196.     style: Bold Italic
  197.  
  198.   # Point size
  199.   size: 12.0
  200.  
  201.   # Offset is the extra space around each character. `offset.y` can be thought of
  202.   # as modifying the line spacing, and `offset.x` as modifying the letter spacing.
  203.   offset:
  204.     x: 0
  205.     y: 1
  206.  
  207.   # Glyph offset determines the locations of the glyphs within their cells with
  208.   # the default being at the bottom. Increasing `x` moves the glyph to the right,
  209.   # increasing `y` moves the glyph upwards.
  210.   #glyph_offset:
  211.   #  x: 0
  212.   #  y: 0
  213.  
  214.   # Thin stroke font rendering (macOS only)
  215.   #
  216.   # Thin strokes are suitable for retina displays, but for non-retina screens
  217.   # it is recommended to set `use_thin_strokes` to `false`
  218.   #
  219.   # macOS >= 10.14.x:
  220.   #
  221.   # If the font quality on non-retina display looks bad then set
  222.   # `use_thin_strokes` to `true` and enable font smoothing by running the
  223.   # following command:
  224.   #   `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
  225.   #
  226.   # This is a global setting and will require a log out or restart to take
  227.   # effect.
  228.   #use_thin_strokes: true
  229.  
  230. # If `true`, bold text is drawn using the bright color variants.
  231. draw_bold_text_with_bright_colors: true
  232.  
  233. # Colors (Tomorrow Night Bright)
  234. colors:
  235.  # Default colors
  236.   primary:
  237.    # background: '0x282c34'
  238.     # foreground: '0xbbc2cf'
  239.     background: '0x300A24'
  240.     foreground: '0xD3D7CF'
  241.  
  242.     # Bright and dim foreground colors
  243.     #
  244.     # The dimmed foreground color is calculated automatically if it is not present.
  245.     # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
  246.     # is `false`, the normal foreground color will be used.
  247.     #dim_foreground: '0x9a9a9a'
  248.     #bright_foreground: '0xffffff'
  249.  
  250.   # Cursor colors
  251.   #
  252.   # Colors which should be used to draw the terminal cursor. If these are unset,
  253.   # the cursor color will be the inverse of the cell color.
  254.   #cursor:
  255.   #  text: '0x000000'
  256.   #  cursor: '0xffffff'
  257.  
  258.   # Selection colors
  259.   #
  260.   # Colors which should be used to draw the selection area. If selection
  261.   # background is unset, selection color will be the inverse of the cell colors.
  262.   # If only text is unset the cell text color will remain the same.
  263.   selection:
  264.     text: '0xbbc2cf'
  265.  
  266.   # Normal colors
  267.   normal:
  268.     black:  '0x1c1f24'
  269.     red:    '0xff6c6b'
  270.     green:  '0x98be65'
  271.     yellow: '0xda8548'
  272.     blue:   '0x51afef'
  273.     magenta: '0xc678dd'
  274.     cyan:   '0x5699af'
  275.     white:  '0x202328'
  276.  
  277.   # Bright colors
  278.   bright:
  279.     black:  '0x5b6268'
  280.     red:    '0xda8548'
  281.     green:  '0x4db5bd'
  282.     yellow: '0xecbe7b'
  283.     blue:   '0x3071db'   # This is 2257a0 in Doom Emacs but I lightened it.
  284.     magenta: '0xa9a1e1'
  285.     cyan:   '0x46d9ff'
  286.     white:  '0xdfdfdf'
  287.  
  288.   # Dim colors
  289.   #
  290.   # If the dim colors are not set, they will be calculated automatically based
  291.   # on the `normal` colors.
  292.   #dim:
  293.   #  black:   '0x000000'
  294.   #  red:     '0x8c3336'
  295.   #  green:   '0x7a8530'
  296.   #  yellow:  '0x97822e'
  297.   #  blue:    '0x506d8f'
  298.   #  magenta: '0x80638e'
  299.   #  cyan:    '0x497e7a'
  300.   #  white:   '0x9a9a9a'
  301.  
  302.   # Indexed Colors
  303.   #
  304.   # The indexed colors include all colors from 16 to 256.
  305.   # When these are not set, they're filled with sensible defaults.
  306.   #
  307.   # Example:
  308.   #   `- { index: 16, color: '0xff00ff' }`
  309.   #
  310.   #indexed_colors: []
  311.  
  312. # Visual Bell
  313. #
  314. # Any time the BEL code is received, Alacritty "rings" the visual bell. Once
  315. # rung, the terminal background will be set to white and transition back to the
  316. # default background color. You can control the rate of this transition by
  317. # setting the `duration` property (represented in milliseconds). You can also
  318. # configure the transition function by setting the `animation` property.
  319. #
  320. # Values for `animation`:
  321. #   - Ease
  322. #   - EaseOut
  323. #   - EaseOutSine
  324. #   - EaseOutQuad
  325. #   - EaseOutCubic
  326. #   - EaseOutQuart
  327. #   - EaseOutQuint
  328. #   - EaseOutExpo
  329. #   - EaseOutCirc
  330. #   - Linear
  331. #
  332. # Specifying a `duration` of `0` will disable the visual bell.
  333. #visual_bell:
  334. #  animation: EaseOutExpo
  335. #  duration: 0
  336. #  color: '0xffffff'
  337.  
  338. # Background opacity
  339. #
  340. # Window opacity as a floating point number from `0.0` to `1.0`.
  341. # The value `0.0` is completely transparent and `1.0` is opaque.
  342. background_opacity: 0.80
  343. # background_opacity: 0.80
  344.  
  345. #selection:
  346.   #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
  347.  
  348.   # When set to `true`, selected text will be copied to the primary clipboard.
  349.   #save_to_clipboard: false
  350.  
  351. # Allow terminal applications to change Alacritty's window title.
  352. #dynamic_title: true
  353.  
  354. #cursor:
  355.   # Cursor style
  356.   #
  357.   # Values for `style`:
  358.   #   - ▇ Block
  359.   #   - _ Underline
  360.   #   - | Beam
  361.   #style: Block
  362.  
  363.   # If this is `true`, the cursor will be rendered as a hollow box when the
  364.   # window is not focused.
  365.   #unfocused_hollow: true
  366.  
  367. # Live config reload (changes require restart)
  368. #live_config_reload: true
  369.  
  370. # Shell
  371. #
  372. # You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
  373. # Entries in `shell.args` are passed unmodified as arguments to the shell.
  374. #
  375. # Default:
  376. #   - (macOS) /bin/bash --login
  377. #   - (Linux/BSD) user login shell
  378. #   - (Windows) powershell
  379. #shell:
  380. #  program: /bin/bash
  381. #  args:
  382. #    - --login
  383.  
  384. # Startup directory
  385. #
  386. # Directory the shell is started in. If this is unset, or `None`, the working
  387. # directory of the parent process will be used.
  388. #working_directory: None
  389.  
  390. # WinPTY backend (Windows only)
  391. #
  392. # Alacritty defaults to using the newer ConPTY backend if it is available,
  393. # since it resolves a lot of bugs and is quite a bit faster. If it is not
  394. # available, the the WinPTY backend will be used instead.
  395. #
  396. # Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
  397. # even if the ConPTY backend is available.
  398. #winpty_backend: false
  399.  
  400. # Send ESC (\x1b) before characters when alt is pressed.
  401. #alt_send_esc: true
  402.  
  403. #debug:
  404.   # Display the time it takes to redraw each frame.
  405.   #render_timer: false
  406.  
  407.   # Keep the log file after quitting Alacritty.
  408.   #persistent_logging: false
  409.  
  410.   # Log level
  411.   #
  412.   # Values for `log_level`:
  413.   #   - None
  414.   #   - Error
  415.   #   - Warn
  416.   #   - Info
  417.   #   - Debug
  418.   #   - Trace
  419.   #log_level: Warn
  420.  
  421.   # Print all received window events.
  422.   #print_events: false
  423.  
  424.   # Record all characters and escape sequences as test data.
  425.   #ref_test: false
  426.  
  427. #mouse:
  428.   # Click settings
  429.   #
  430.   # The `double_click` and `triple_click` settings control the time
  431.   # alacritty should wait for accepting multiple clicks as one double
  432.   # or triple click.
  433.   #double_click: { threshold: 300 }
  434.   #triple_click: { threshold: 300 }
  435.  
  436.   # If this is `true`, the cursor is temporarily hidden when typing.
  437.   #hide_when_typing: false
  438.  
  439.   #url:
  440.     # URL launcher
  441.     #
  442.     # This program is executed when clicking on a text which is recognized as a URL.
  443.     # The URL is always added to the command as the last parameter.
  444.     #
  445.     # When set to `None`, URL launching will be disabled completely.
  446.     #
  447.     # Default:
  448.     #   - (macOS) open
  449.     #   - (Linux/BSD) xdg-open
  450.     #   - (Windows) explorer
  451.     #launcher:
  452.     #  program: xdg-open
  453.     #  args: []
  454.  
  455.     # URL modifiers
  456.     #
  457.     # These are the modifiers that need to be held down for opening URLs when clicking
  458.     # on them. The available modifiers are documented in the key binding section.
  459.     #modifiers: None
  460.  
  461. # Mouse bindings
  462. #
  463. # Mouse bindings are specified as a list of objects, much like the key
  464. # bindings further below.
  465. #
  466. # Each mouse binding will specify a:
  467. #
  468. # - `mouse`:
  469. #
  470. #   - Middle
  471. #   - Left
  472. #   - Right
  473. #   - Numeric identifier such as `5`
  474. #
  475. # - `action` (see key bindings)
  476. #
  477. # And optionally:
  478. #
  479. # - `mods` (see key bindings)
  480. #mouse_bindings:
  481. #  - { mouse: Middle, action: PasteSelection }
  482.  
  483. # Key bindings
  484. #
  485. # Key bindings are specified as a list of objects. For example, this is the
  486. # default paste binding:
  487. #
  488. # `- { key: V, mods: Control|Shift, action: Paste }`
  489. #
  490. # Each key binding will specify a:
  491. #
  492. # - `key`: Identifier of the key pressed
  493. #
  494. #    - A-Z
  495. #    - F1-F24
  496. #    - Key0-Key9
  497. #
  498. #    A full list with available key codes can be found here:
  499. #    https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
  500. #
  501. #    Instead of using the name of the keys, the `key` field also supports using
  502. #    the scancode of the desired key. Scancodes have to be specified as a
  503. #    decimal number. This command will allow you to display the hex scancodes
  504. #    for certain keys:
  505. #
  506. #       `showkey --scancodes`.
  507. #
  508. # Then exactly one of:
  509. #
  510. # - `chars`: Send a byte sequence to the running application
  511. #
  512. #    The `chars` field writes the specified string to the terminal. This makes
  513. #    it possible to pass escape sequences. To find escape codes for bindings
  514. #    like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
  515. #    of tmux. Note that applications use terminfo to map escape sequences back
  516. #    to keys. It is therefore required to update the terminfo when changing an
  517. #    escape sequence.
  518. #
  519. # - `action`: Execute a predefined action
  520. #
  521. #   - Copy
  522. #   - Paste
  523. #   - PasteSelection
  524. #   - IncreaseFontSize
  525. #   - DecreaseFontSize
  526. #   - ResetFontSize
  527. #   - ScrollPageUp
  528. #   - ScrollPageDown
  529. #   - ScrollLineUp
  530. #   - ScrollLineDown
  531. #   - ScrollToTop
  532. #   - ScrollToBottom
  533. #   - ClearHistory
  534. #   - Hide
  535. #   - Minimize
  536. #   - Quit
  537. #   - ToggleFullscreen
  538. #   - SpawnNewInstance
  539. #   - ClearLogNotice
  540. #   - ReceiveChar
  541. #   - None
  542. #
  543. #   (macOS only):
  544. #   - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
  545. #
  546. # - `command`: Fork and execute a specified command plus arguments
  547. #
  548. #    The `command` field must be a map containing a `program` string and an
  549. #    `args` array of command line parameter strings. For example:
  550. #       `{ program: "alacritty", args: ["-e", "vttest"] }`
  551. #
  552. # And optionally:
  553. #
  554. # - `mods`: Key modifiers to filter binding actions
  555. #
  556. #    - Command
  557. #    - Control
  558. #    - Option
  559. #    - Super
  560. #    - Shift
  561. #    - Alt
  562. #
  563. #    Multiple `mods` can be combined using `|` like this:
  564. #       `mods: Control|Shift`.
  565. #    Whitespace and capitalization are relevant and must match the example.
  566. #
  567. # - `mode`: Indicate a binding for only specific terminal reported modes
  568. #
  569. #    This is mainly used to send applications the correct escape sequences
  570. #    when in different modes.
  571. #
  572. #    - AppCursor
  573. #    - AppKeypad
  574. #    - Alt
  575. #
  576. #    A `~` operator can be used before a mode to apply the binding whenever
  577. #    the mode is *not* active, e.g. `~Alt`.
  578. #
  579. # Bindings are always filled by default, but will be replaced when a new
  580. # binding with the same triggers is defined. To unset a default binding, it can
  581. # be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
  582. # a no-op if you do not wish to receive input characters for that binding.
  583. key_bindings:
  584.    # (Windows, Linux, and BSD only)
  585.   - { key: V,         mods: Control|Shift, action: Paste                       }
  586.   - { key: C,         mods: Control|Shift, action: Copy                        }
  587.   - { key: Insert,    mods: Shift,         action: PasteSelection              }
  588.   - { key: Key0,      mods: Control,       action: ResetFontSize               }
  589.   - { key: Equals,    mods: Control,       action: IncreaseFontSize            }
  590.   - { key: Plus,      mods: Control,       action: IncreaseFontSize            }
  591.   - { key: Minus,     mods: Control,       action: DecreaseFontSize            }
  592.   - { key: Minus,     mods: Control,       action: DecreaseFontSize            }
  593.   - { key: F11,       mods: None,          action: ToggleFullscreen            }
  594.   - { key: Paste,     mods: None,          action: Paste                       }
  595.   - { key: Copy,      mods: None,          action: Copy                        }
  596.   - { key: L,         mods: Control,       action: ClearLogNotice              }
  597.   - { key: L,         mods: Control,       chars: "\x0c"                       }
  598.   - { key: PageUp,    mods: None,          action: ScrollPageUp,   mode: ~Alt  }
  599.   - { key: PageDown,  mods: None,          action: ScrollPageDown, mode: ~Alt  }
  600.   - { key: Home,      mods: Shift,         action: ScrollToTop,    mode: ~Alt  }
  601.   - { key: End,       mods: Shift,         action: ScrollToBottom, mode: ~Alt  }
  602.  
Add Comment
Please, Sign In to add comment