# man 5 alacritty 

import = ["~/.config/alacritty/themes/themes/solarized_dark.toml"]

# list fonts on mac, part of font-config installed by brew
# $ fc-list
# $ fc-list | grep 'family:' | less

[font]
## MesloLGS font
# normal.family = "MesloLGS Nerd Font Mono"
# bold.family = "MesloLGS Nerd Font Mono"
# italic.family = "MesloLGS Nerd Font Mono"
# bold_italic.family = "MesloLGS Nerd Font Mono"
# size = 18
# offset.x = 1

# JetBrains Nerd font
normal.family     = "JetBrainsMono NF"
bold.family        = "JetBrainsMono NF SemiBold"
italic.family      = "JetBrainsMono NFM Thin"
bold_italic.family = "JetBrainsMono NFM"
size = 18
offset.x = 1

[window]
dynamic_padding = true
padding.x = 5
padding.y = 3
dimensions.columns = 89
dimensions.lines = 41
# trick for alt not displaying special characters
# https://github.com/alacritty/alacritty/issues/93#issuecomment-1428462339
option_as_alt = "OnlyLeft"

# decorations = "buttonless"
# decorations = "full"
# decorations = "transparent"
# decorations = "none"
startup_mode = "Windowed"

dynamic_title = true

[scrolling]
history = 20000

[selection]
  save_to_clipboard = true


# key bidnings
# use xxd to find codes of key presses

[keyboard]
bindings = [
	# tmux bindings
	# alt + <number> switches to window <number>
	{ key = "1" , mods = "Option", chars = "\u0001\u0031" }, # C-a 1
	{ key = "2" , mods = "Option", chars = "\u0001\u0032" }, # C-a 2
	{ key = "3" , mods = "Option", chars = "\u0001\u0033" }, # C-a 3
	{ key = "4" , mods = "Option", chars = "\u0001\u0034" }, # C-a 4
	{ key = "5" , mods = "Option", chars = "\u0001\u0035" }, # C-a 5
	{ key = "6" , mods = "Option", chars = "\u0001\u0036" }, # C-a 6
	{ key = "7" , mods = "Option", chars = "\u0001\u0037" }, # C-a 7
	{ key = "8" , mods = "Option", chars = "\u0001\u0038" }, # C-a 8
	{ key = "9" , mods = "Option", chars = "\u0001\u0039" }, # C-a 9
	{ key = "h" , mods = "Option", chars = "\u0001\u0068" }, # C-a left
	{ key = "j" , mods = "Option", chars = "\u0001\u006a" }, # C-a down
	{ key = "k" , mods = "Option", chars = "\u0001\u006b" }, # C-a up
	{ key = "l" , mods = "Option", chars = "\u0001\u006c" }, # C-a right

	# for tmux resizing
	# option + command + <hjkl> for resizing
	{ key = "k" , mods = "Option|command", chars = "\u0001\u001b\u005b\u0031\u003b\u0035\u0041" }, # C-a C-up
	{ key = "j" , mods = "Option|command", chars = "\u0001\u001b\u005b\u0031\u003b\u0035\u0042" }, # C-a C-down
	{ key = "l" , mods = "Option|command", chars = "\u0001\u001b\u005b\u0031\u003b\u0035\u0043" }, # C-a C-right
	{ key = "h" , mods = "Option|command", chars = "\u0001\u001b\u005b\u0031\u003b\u0035\u0044" }, # C-a C-left

	{ key = "n" , mods = "Alt", chars = "\u0001\u006e" }, # alt+n -> C-a n
	{ key = "p" , mods = "Alt", chars = "\u0001\u0070" }, # alt+p -> C-a p

	{ key = "ArrowLeft",  mods = "Command|Shift", action = "SelectPreviousTab"  },
	{ key = "ArrowRight", mods = "Command|Shift", action = "SelectNextTab"  },

]

[cursor]
style.shape = "Block"
style.blinking = "Off"

[mouse]
# hide_when_typing = true

