Configure alacritty

- add config file ~/.config/alacritty/alacritty.yml
  (not synced by mackup)
- make Gnome's <Super>t shortcut start a new alacritty instance
- fix minor mouse issue interacting with vim
This commit is contained in:
Alexander Hess 2022-08-12 14:34:44 +02:00
parent a8f8caccc0
commit 137ebf29a9
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
4 changed files with 96 additions and 2 deletions

View file

@ -0,0 +1,88 @@
# Source: https://github.com/alacritty/alacritty/blob/master/alacritty.yml
window:
# Blank space added around the window in pixels
padding:
x: 10
y: 10
# Spread additional padding evenly around the terminal content
dynamic_padding: true
# Neither borders nor title bar
decorations: none
# Background opacity (0.0 -> completely transparent; 1.0 -> opaque)
opacity: 0.95
scrolling:
# Number of lines in the scrollback buffer (0 -> disable scrolling)
history: 9999
# Scrolling distance multiplier
multiplier: 10
font:
normal:
family: FiraCode Nerd Font
style: Regular
bold:
family: FiraCode Nerd Font
style: Bold
italic:
family: FiraCode Nerd Font
style: Light
bold_italic:
family: FiraCode Nerd Font
style: Semibold
size: 12.0
offset:
x: 0 # letter spacing
y: 0 # line spacing
draw_bold_text_with_bright_colors: true
cursor:
style:
# ▇ (Block) vs. _ (Underline) vs. | (Beam)
shape: Block
blinking: On
blink_interval: 500 # in ms
unfocused_hollow: true # when window not focused
thickness: 0.1 # between 0.0 and 1.0
shell:
program: /usr/bin/zsh
args:
- -l # --login
key_bindings:
# Open a new terminal in the same folder
- { key: Return, mods: Control|Shift, action: SpawnNewInstance }

View file

@ -97,13 +97,13 @@ name='Google Chrome'
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5] [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5]
# Mimic i3wm's default way to open terminals # Mimic i3wm's default way to open terminals
binding='<Super>Return' binding='<Super>Return'
command='gnome-terminal' command='alacritty'
name='Terminal (1)' name='Terminal (1)'
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6] [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6]
# Faster than the default <Primary><Alt>t # Faster than the default <Primary><Alt>t
binding='<Super>t' binding='<Super>t'
command='gnome-terminal' command='alacritty'
name='Terminal (2)' name='Terminal (2)'
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7] [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7]

View file

@ -7,6 +7,7 @@ directory = mackup
# Do not sync configuration files managed by # Do not sync configuration files managed by
# https://gitlab.webartifex.biz/alexander/dotfiles # https://gitlab.webartifex.biz/alexander/dotfiles
alacritty
bash bash
bat bat
git git

View file

@ -130,6 +130,11 @@ nmap Q <Nop>
cnoremap w!! w !sudo tee % >/dev/null cnoremap w!! w !sudo tee % >/dev/null
" Fix mouse issues with Alacritty terminal
" Source: https://wiki.archlinux.org/title/Alacritty#Mouse_not_working_properly_in_Vim
set ttymouse=sgr
" Enable the mouse for selections, including a toggle for this mode " Enable the mouse for selections, including a toggle for this mode
set mouse=a set mouse=a
let g:mouse_enabled=1 let g:mouse_enabled=1