From e4af88ee6859d129065e8e7c6f96c9ae7ea188a4 Mon Sep 17 00:00:00 2001 From: Petr Nyc Date: Thu, 15 Aug 2024 15:04:55 +0200 Subject: [PATCH] alacritty config improvements --- .config/alacritty/alacritty.toml | 89 ++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index a5d3aed..936b4e8 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -1,29 +1,28 @@ -import = ["~/.config/alacritty/themes/themes/solarized_dark.toml"] +# man 5 alacritty +import = ["~/.config/alacritty/themes/themes/solarized_dark.toml"] -# [font.normal] -# # family = "MesloLGS NF" -# family = "MesloLGS Nerd Font Mono" -# +# list fonts on mac, part of font-config installed by brew +# $ fc-list +# $ fc-list | grep 'family:' | less [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" +## 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] -# decorations = "none" - -# [window.padding] -# x = 5 -# y = 3 - -# window.dynamic_padding = true - [window] dynamic_padding = true padding.x = 5 @@ -32,13 +31,16 @@ 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 = "Both" +option_as_alt = "OnlyLeft" # decorations = "buttonless" # decorations = "full" # decorations = "transparent" +# decorations = "none" startup_mode = "Windowed" +dynamic_title = true + [scrolling] history = 20000 @@ -52,24 +54,27 @@ history = 20000 [keyboard] bindings = [ # tmux bindings - # option 1 => ^A 1 - { key = "1" , mods = "Option", chars = "\u0001\u0031" }, - { key = "2" , mods = "Option", chars = "\u0001\u0032" }, - { key = "3" , mods = "Option", chars = "\u0001\u0033" }, - { key = "4" , mods = "Option", chars = "\u0001\u0034" }, - { key = "5" , mods = "Option", chars = "\u0001\u0035" }, - { key = "6" , mods = "Option", chars = "\u0001\u0036" }, - { key = "7" , mods = "Option", chars = "\u0001\u0037" }, - { key = "8" , mods = "Option", chars = "\u0001\u0038" }, - { key = "9" , mods = "Option", chars = "\u0001\u0039" }, - { key = "h" , mods = "Option", chars = "\u0001\u0068" }, - { key = "j" , mods = "Option", chars = "\u0001\u006a" }, - { key = "k" , mods = "Option", chars = "\u0001\u006b" }, - { key = "l" , mods = "Option", chars = "\u0001\u006c" }, - { key = "h" , mods = "Option|command", chars = "\u0001\u0068" }, - { key = "j" , mods = "Option|command", chars = "\u0001\u006a" }, - { key = "k" , mods = "Option|command", chars = "\u0001\u006b" }, - { key = "l" , mods = "Option|command", chars = "\u0001\u006c" }, + # alt + switches to window + { 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 + 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 @@ -78,3 +83,11 @@ bindings = [ { key = "ArrowRight", mods = "Command|Shift", action = "SelectNextTab" }, ] + +[cursor] +style.shape = "Block" +style.blinking = "Off" + +[mouse] +# hide_when_typing = true +