Skip to content

Instantly share code, notes, and snippets.

@ruddra
Last active April 10, 2023 13:55
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruddra/900e48cb65645ccfcf57545c7e192972 to your computer and use it in GitHub Desktop.
Save ruddra/900e48cb65645ccfcf57545c7e192972 to your computer and use it in GitHub Desktop.
Alacritty configuration
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Setup term for programs to be able to use it
env:
TERM: xterm-256color-italic # adding this because of italic support: https://apple.stackexchange.com/questions/266333/how-to-show-italic-in-vim-in-iterm2
window:
# Spread additional padding evenly around the terminal content.
dynamic_padding: false
# Startup Mode (changes require restart)
startup_mode: Maximized
# Window decorations
#
# Available values:
# - full: borders and title bar
# - none: neither borders nor title bar
# - transparent: title bar, transparent background and title bar buttons
# - buttonless: title bar, transparent background, but no title bar buttons
decorations: transparent
# padding top and left
padding:
x: 0
y: 25
# Sample Font configuration for font: OperatorMonoLig Nerd Font.
# Feel free to use different font configuration family & face for each sections
font:
# Normal font face - Also used to draw glyphs on tmux & VIM
# NOTE: You may use any font you'd like but make sure the normal fonts
# support ligatures/glyphs. That's used by tmux & VIM to provide a better
# UI for powerline & tmux bottom bar.
normal:
# Font name
family: OperatorMono Font
# Font face
style: Light
# Bold font face
bold:
family: OperatorMono Font
style: Book
# Italic font face
italic:
family: OperatorMono Font
style: Light Italic
# Bold italic font face
# Note: Since i don't have a font italic version of this font, I just specified
# italic & it just works. You may specifiy the bold italic version if it exists
# for your font
bold_italic:
family: OperatorMono Font
style: Book Italic
# Font size
size: 18.0
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing
# I've given in 14 spacing which fits really well with my fonts, you may change it
# to your convenience but make sure to adjust 'glyph_offset' appropriately post that
offset:
x: 0
y: 0
# Note: This requires RESTART
# By default when you change the offset above you'll see an issue, where the texts are bottom
# aligned with the cursor, this is to make sure they center align.
# This offset should usually be 1/2 of the above offset-y being set.
glyph_offset:
x: 0
# Keeping this as half of offset to vertically align the text in cursor
y: 0
# Better font rendering for mac
use_thin_strokes: true
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
save_to_clipboard: true
# Live config reload (changes require restart)
live_config_reload: true
# Setup some amazing custom key bindings here - Best thing is you can setup key bindings
# using Mac's 'command' to control your tmux.
# A great reference: https://arslan.io/2018/02/05/gpu-accelerated-terminal-alacritty/#make-alacritty-feel-like-iterm2
scrolling:
# maximum number of lines in the scrollback buffer. Specifying '0' will
# disable scrolling.
history: 10000
# Number of lines the viewport will move for every line scrolled when
# scrollback is enabled (history > 0).
multiplier: 3
key_bindings:
# Use command + [ - to go to previous tmux window
- { key: LBracket, mods: Command, chars: "\x5c\x70" }
# Use command + ] - to go to previous tmux window
- { key: RBracket, mods: Command, chars: "\x5c\x6e" }
# ctrl-^ doesn't work in some terminals like alacritty
- { key: Key6, mods: Control, chars: "\x1e" }
# Colors (Gruvbox dark)
colors:
# Default colors
primary:
# hard contrast: background = '#1d2021'
background: "#282828"
# soft contrast: background = '#32302f'
foreground: "#ebdbb2"
# Normal colors
normal:
black: "#282828"
red: "#cc241d"
green: "#98971a"
yellow: "#d79921"
blue: "#458588"
magenta: "#b16286"
cyan: "#689d6a"
white: "#a89984"
# Bright colors
bright:
black: "#928374"
red: "#fb4934"
green: "#b8bb26"
yellow: "#fabd2f"
blue: "#83a598"
magenta: "#d3869b"
cyan: "#8ec07c"
white: "#ebdbb2"
bell:
animation: EaseOutExpo
color: "0xffffff"
duration: 0
shell:
program: /usr/local/bin/fish
args:
- -l
- -c
- "tmux attach || tmux"
mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
# double_click: { threshold: 300 }
# triple_click: { threshold: 300 }
# 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
cursor:
# Cursor style
#
# Values for 'style':
# - ▇ Block
# - _ Underline
# - | Beam
style: Block
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
unfocused_hollow: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment