alacritty: migrate to toml

This commit is contained in:
Pavel Korytov 2025-11-12 18:21:01 +03:00
parent 46f335210f
commit 6328304e70
3 changed files with 298 additions and 130 deletions

View file

@ -0,0 +1,152 @@
decorations = "none"
[colors.bright]
Black = "#484848"
Blue = "#cbcfff"
Cyan = "#88c8ff"
Green = "#8adf80"
Magenta = "#df8fff"
Red = "#ff8f88"
White = "#ffffff"
Yellow = "#fac200"
[colors.normal]
black = "#222222"
blue = "#375cd8"
cyan = "#1f6fbf"
green = "#217a3c"
magenta = "#ba35af"
red = "#cc3333"
white = "#fff8f0"
yellow = "#8a5d00"
[colors.primary]
background = "#fff8f0"
foreground = "#222222"
[env]
TERM = "xterm-256color"
[font]
size = 10
[font.normal]
family = "JetBrainsMono Nerd Font"
style = "Regular"
[[keyboard.bindings]]
action = "Paste"
key = "Paste"
[[keyboard.bindings]]
action = "Copy"
key = "Copy"
[[keyboard.bindings]]
action = "ClearLogNotice"
key = "L"
mods = "Control"
[[keyboard.bindings]]
chars = "\f"
key = "L"
mode = "~Vi|~Search"
mods = "Control"
[[keyboard.bindings]]
action = "ScrollPageUp"
key = "PageUp"
mode = "~Alt"
mods = "Shift"
[[keyboard.bindings]]
action = "ScrollPageDown"
key = "PageDown"
mode = "~Alt"
mods = "Shift"
[[keyboard.bindings]]
action = "ScrollToTop"
key = "Home"
mode = "~Alt"
mods = "Shift"
[[keyboard.bindings]]
action = "ScrollToBottom"
key = "End"
mode = "~Alt"
mods = "Shift"
[[keyboard.bindings]]
action = "ReceiveChar"
key = "Space"
mode = "~Search"
mods = "Shift|Control"
[[keyboard.bindings]]
action = "Paste"
key = "V"
mode = "~Vi"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "Copy"
key = "C"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "ReceiveChar"
key = "F"
mode = "~Search"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "ReceiveChar"
key = "B"
mode = "~Search"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "PasteSelection"
key = "Insert"
mods = "Shift"
[[keyboard.bindings]]
action = "ResetFontSize"
key = "Key0"
mods = "Control"
[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "Equals"
mods = "Control"
[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "Plus"
mods = "Control"
[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "NumpadAdd"
mods = "Control"
[[keyboard.bindings]]
action = "DecreaseFontSize"
key = "Minus"
mods = "Control"
[[keyboard.bindings]]
action = "DecreaseFontSize"
key = "NumpadSubtract"
mods = "Control"
[window]
dynamic_padding = true
opacity = 1
[window.padding]
x = 0
y = 0
[keyboard]

View file

@ -1,69 +0,0 @@
# [[file:../../Console.org::*Alacritty][Alacritty:1]]
decorations: none
font:
normal:
family: JetBrainsMono Nerd Font
style: Regular
size: 10
env:
TERM: xterm-256color
colors:
primary:
background: '#fff8f0'
foreground: '#222222'
normal:
black: '#222222'
red: '#cc3333'
green: '#217a3c'
yellow: '#8a5d00'
blue: '#375cd8'
magenta: '#ba35af'
cyan: '#1f6fbf'
white: '#fff8f0'
bright:
Black: '#484848'
Red: '#ff8f88'
Green: '#8adf80'
Yellow: '#fac200'
Blue: '#cbcfff'
Magenta: '#df8fff'
Cyan: '#88c8ff'
White: '#ffffff'
window:
padding:
x: 0
y: 0
dynamic_padding: true
opacity: 1
key_bindings:
- { key: Paste, action: Paste }
- { key: Copy, action: Copy }
- { key: L, mods: Control, action: ClearLogNotice }
- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Turn off vi mode
- { key: Space, mods: Shift|Control, mode: ~Search, action: ReceiveChar }
# (Windows, Linux, and BSD only)
- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
- { key: C, mods: Control|Shift, action: Copy }
- { key: F, mods: Control|Shift, mode: ~Search, action: ReceiveChar }
- { key: B, mods: Control|Shift, mode: ~Search, action: ReceiveChar }
- { key: Insert, mods: Shift, action: PasteSelection }
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: IncreaseFontSize }
- { key: Plus, mods: Control, action: IncreaseFontSize }
- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
- { key: Minus, mods: Control, action: DecreaseFontSize }
- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
# Alacritty:1 ends here

View file

@ -700,7 +700,7 @@ source ~/.tmux.line.conf
#+end_src #+end_src
* Alacritty * Alacritty
:PROPERTIES: :PROPERTIES:
:header-args+: :tangle ./.config/alacritty/alacritty.yml :comments link :header-args+: :tangle ./.config/alacritty/alacritty.toml :comments link
:END: :END:
| Arch dependency | | Arch dependency |
@ -712,74 +712,159 @@ source ~/.tmux.line.conf
References: References:
- [[https://github.com/alacritty/alacritty/blob/master/alacritty.yml][default config]] - [[https://github.com/alacritty/alacritty/blob/master/alacritty.yml][default config]]
#+begin_src yaml :noweb yes #+begin_src toml :noweb yes
decorations: none decorations = "none"
font: [colors.bright]
normal: Black = "<<get-color(name="light-black")>>"
family: JetBrainsMono Nerd Font Red = "<<get-color(name="light-red")>>"
style: Regular Green = "<<get-color(name="light-green")>>"
Yellow = "<<get-color(name="light-yellow")>>"
Blue = "<<get-color(name="light-blue")>>"
Magenta = "<<get-color(name="light-magenta")>>"
Cyan = "<<get-color(name="light-cyan")>>"
White = "<<get-color(name="light-white")>>"
size: 10 [colors.normal]
black = "<<get-color(name="black")>>"
red = "<<get-color(name="red")>>"
green = "<<get-color(name="green")>>"
yellow = "<<get-color(name="yellow")>>"
blue = "<<get-color(name="blue")>>"
magenta = "<<get-color(name="magenta")>>"
cyan = "<<get-color(name="cyan")>>"
white = "<<get-color(name="white")>>"
env: [colors.primary]
TERM: xterm-256color background: "<<get-color(name="bg")>>"
foreground: "<<get-color(name="fg")>>"
colors: [env]
primary: TERM = "xterm-256color"
background: '<<get-color(name="bg")>>'
foreground: '<<get-color(name="fg")>>'
normal:
black: '<<get-color(name="black")>>'
red: '<<get-color(name="red")>>'
green: '<<get-color(name="green")>>'
yellow: '<<get-color(name="yellow")>>'
blue: '<<get-color(name="blue")>>'
magenta: '<<get-color(name="magenta")>>'
cyan: '<<get-color(name="cyan")>>'
white: '<<get-color(name="white")>>'
bright:
Black: '<<get-color(name="light-black")>>'
Red: '<<get-color(name="light-red")>>'
Green: '<<get-color(name="light-green")>>'
Yellow: '<<get-color(name="light-yellow")>>'
Blue: '<<get-color(name="light-blue")>>'
Magenta: '<<get-color(name="light-magenta")>>'
Cyan: '<<get-color(name="light-cyan")>>'
White: '<<get-color(name="light-white")>>'
window: [font]
padding: size = 10
x: 0
y: 0
dynamic_padding: true
opacity: 1
key_bindings: [font.normal]
- { key: Paste, action: Paste } family = "JetBrainsMono Nerd Font"
- { key: Copy, action: Copy } style = "Regular"
- { key: L, mods: Control, action: ClearLogNotice }
- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
# Turn off vi mode [[keyboard.bindings]]
- { key: Space, mods: Shift|Control, mode: ~Search, action: ReceiveChar } action = "Paste"
key = "Paste"
# (Windows, Linux, and BSD only) [[keyboard.bindings]]
- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } action = "Copy"
- { key: C, mods: Control|Shift, action: Copy } key = "Copy"
- { key: F, mods: Control|Shift, mode: ~Search, action: ReceiveChar }
- { key: B, mods: Control|Shift, mode: ~Search, action: ReceiveChar } [[keyboard.bindings]]
- { key: Insert, mods: Shift, action: PasteSelection } action = "ClearLogNotice"
- { key: Key0, mods: Control, action: ResetFontSize } key = "L"
- { key: Equals, mods: Control, action: IncreaseFontSize } mods = "Control"
- { key: Plus, mods: Control, action: IncreaseFontSize }
- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } [[keyboard.bindings]]
- { key: Minus, mods: Control, action: DecreaseFontSize } chars = "\f"
- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } key = "L"
mode = "~Vi|~Search"
mods = "Control"
[[keyboard.bindings]]
action = "ScrollPageUp"
key = "PageUp"
mode = "~Alt"
mods = "Shift"
[[keyboard.bindings]]
action = "ScrollPageDown"
key = "PageDown"
mode = "~Alt"
mods = "Shift"
[[keyboard.bindings]]
action = "ScrollToTop"
key = "Home"
mode = "~Alt"
mods = "Shift"
[[keyboard.bindings]]
action = "ScrollToBottom"
key = "End"
mode = "~Alt"
mods = "Shift"
[[keyboard.bindings]]
action = "ReceiveChar"
key = "Space"
mode = "~Search"
mods = "Shift|Control"
[[keyboard.bindings]]
action = "Paste"
key = "V"
mode = "~Vi"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "Copy"
key = "C"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "ReceiveChar"
key = "F"
mode = "~Search"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "ReceiveChar"
key = "B"
mode = "~Search"
mods = "Control|Shift"
[[keyboard.bindings]]
action = "PasteSelection"
key = "Insert"
mods = "Shift"
[[keyboard.bindings]]
action = "ResetFontSize"
key = "Key0"
mods = "Control"
[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "Equals"
mods = "Control"
[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "Plus"
mods = "Control"
[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "NumpadAdd"
mods = "Control"
[[keyboard.bindings]]
action = "DecreaseFontSize"
key = "Minus"
mods = "Control"
[[keyboard.bindings]]
action = "DecreaseFontSize"
key = "NumpadSubtract"
mods = "Control"
[window]
dynamic_padding = true
opacity = 1
[window.padding]
x = 0
y = 0
[keyboard]
#+end_src #+end_src
* Bottom * Bottom
| Arch dependency | Description | | Arch dependency | Description |