software:gui:alacritty
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| software:gui:alacritty [2023/11/22 14:32] – warnaud | software:gui:alacritty [2023/11/23 10:08] (current) – warnaud | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Very nice terminal ====== | ||
| + | ===== Download ===== | ||
| + | -> https:// | ||
| + | ===== config file example ===== | ||
| + | <code perl> | ||
| + | window: | ||
| + | # Window dimensions (changes require restart) | ||
| + | # | ||
| + | # Number of lines/ | ||
| + | # must be at least `2`, while using a value of `0` for columns and lines will | ||
| + | # fall back to the window manager' | ||
| + | dimensions: | ||
| + | columns: 200 | ||
| + | lines: 50 | ||
| + | |||
| + | # Window position (changes require restart) | ||
| + | # | ||
| + | # Specified in number of pixels. | ||
| + | # If the position is not set, the window manager will handle the placement. | ||
| + | position: | ||
| + | x: 70 | ||
| + | y: 70 | ||
| + | |||
| + | # Window padding (changes require restart) | ||
| + | # | ||
| + | # Blank space added around the window in pixels. This padding is scaled | ||
| + | # by DPI and the specified value is always added at both opposing sides. | ||
| + | #padding: | ||
| + | # x: 0 | ||
| + | # y: 0 | ||
| + | padding: | ||
| + | x: 3 | ||
| + | y: 3 | ||
| + | |||
| + | # Spread additional padding evenly around the terminal content. | ||
| + | dynamic_padding: | ||
| + | |||
| + | # Window decorations | ||
| + | # | ||
| + | # Values for `decorations`: | ||
| + | # - full: Borders and title bar | ||
| + | # - none: Neither borders nor title bar | ||
| + | # | ||
| + | # Values for `decorations` (macOS only): | ||
| + | # - transparent: | ||
| + | # - buttonless: Title bar, transparent background and no title bar buttons | ||
| + | # | ||
| + | decorations: | ||
| + | |||
| + | scrolling: | ||
| + | # Maximum number of lines in the scrollback buffer. | ||
| + | # Specifying ' | ||
| + | history: 5000 | ||
| + | # Font configuration | ||
| + | font: | ||
| + | # Normal (roman) font face | ||
| + | normal: | ||
| + | # Font family | ||
| + | # | ||
| + | # Default: | ||
| + | # - (macOS) Menlo | ||
| + | # - (Linux/BSD) monospace | ||
| + | # - (Windows) Consolas | ||
| + | # family: SauceCodePro Nerd Font | ||
| + | # family: CodeNewRoman Nerd Font | ||
| + | # family: RobotoMono Nerd Font | ||
| + | # family: Hack | ||
| + | # family: JetBrains Mono | ||
| + | # family: UbuntuMono Nerd Font | ||
| + | # family: Monofur Nerd Font | ||
| + | # family: TerminessTTF Nerd Font | ||
| + | family: MesloLGS NF | ||
| + | |||
| + | # The `style` can be specified to pick a specific face. | ||
| + | style: Regular | ||
| + | # Bold font face | ||
| + | bold: | ||
| + | # Font family | ||
| + | # | ||
| + | # If the bold family is not specified, it will fall back to the | ||
| + | # | ||
| + | # If the bold family is not specified, it will fall back to the | ||
| + | # value specified for the normal font. | ||
| + | # family: SauceCodePro Nerd Font | ||
| + | # family: CodeNewRoman Nerd Font | ||
| + | # family: RobotoMono Nerd Font | ||
| + | # family: Hack | ||
| + | # family: JetBrains Mono | ||
| + | # family: UbuntuMono Nerd Font | ||
| + | # family: Monofur Nerd Font | ||
| + | # family: TerminessTTF Nerd Font | ||
| + | family: MesloLGS NF | ||
| + | |||
| + | # The `style` can be specified to pick a specific face. | ||
| + | style: Bold | ||
| + | |||
| + | # Italic font face | ||
| + | italic: | ||
| + | # Font family | ||
| + | # | ||
| + | # If the italic family is not specified, it will fall back to the | ||
| + | # value specified for the normal font. | ||
| + | # family: SauceCodePro Nerd Font Mono | ||
| + | # family: CodeNewRoman Nerd Font | ||
| + | # family: RobotoMono Nerd Font | ||
| + | # family: Hack | ||
| + | # family: JetBrains Mono | ||
| + | # family: UbuntuMono Nerd Font | ||
| + | # family: Monofuritalic Nerd Font Mono | ||
| + | # family: TerminessTTF Nerd Font | ||
| + | family: MesloLGS NF | ||
| + | |||
| + | # The `style` can be specified to pick a specific face. | ||
| + | style: Italic | ||
| + | |||
| + | # Bold italic font face | ||
| + | bold_italic: | ||
| + | # Font family | ||
| + | # | ||
| + | # If the bold italic family is not specified, it will fall back to the | ||
| + | # value specified for the normal font. | ||
| + | # family: SauceCodePro Nerd Font Mono | ||
| + | # family: CodeNewRoman Nerd Font | ||
| + | # family: RobotoMono Nerd Font | ||
| + | # family: Hack | ||
| + | # family: JetBrains Mono | ||
| + | # family: UbuntuMono Nerd Font | ||
| + | # family: Monofuritalic Nerd Font Mono | ||
| + | # family: TerminessTTF Nerd Font | ||
| + | family: MesloLGS NF | ||
| + | |||
| + | # The `style` can be specified to pick a specific face. | ||
| + | style: Bold Italic | ||
| + | |||
| + | # Point size | ||
| + | size: 14.0 | ||
| + | |||
| + | # Background opacity | ||
| + | # | ||
| + | # Window opacity as a floating point number from `0.0` to `1.0`. | ||
| + | # The value `0.0` is completely transparent and `1.0` is opaque. | ||
| + | # background_opacity: | ||
| + | # background_opacity: | ||
| + | |||
| + | #cursor: | ||
| + | # Cursor style | ||
| + | # | ||
| + | # Values for `style`: | ||
| + | # - ▇ Block | ||
| + | # - _ Underline | ||
| + | # - | Beam | ||
| + | style: Beam | ||
| + | |||
| + | key_bindings: | ||
| + | - { key: Return, | ||
| + | </ | ||
| + | |||
| + | ===== Toggle fullscreen ===== | ||
| + | <code bash>vi ~/ | ||
| + | <code lua> | ||
| + | local spaces = require(" | ||
| + | |||
| + | -- Switch alacritty | ||
| + | hs.hotkey.bind({' | ||
| + | local BUNDLE_ID = ' | ||
| + | function moveWindow(alacritty, | ||
| + | -- move to main space | ||
| + | local win = nil | ||
| + | while win == nil do | ||
| + | win = alacritty: | ||
| + | end | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | if win: | ||
| + | hs.eventtap.keyStroke(' | ||
| + | end | ||
| + | winFrame = win:frame() | ||
| + | scrFrame = mainScreen: | ||
| + | winFrame.w = scrFrame.w | ||
| + | winFrame.y = scrFrame.y | ||
| + | winFrame.x = scrFrame.x | ||
| + | print(" | ||
| + | win: | ||
| + | print(" | ||
| + | spaces.moveWindowToSpace(win, | ||
| + | if win: | ||
| + | hs.eventtap.keyStroke(' | ||
| + | end | ||
| + | win:focus() | ||
| + | end | ||
| + | local alacritty = hs.application.get(BUNDLE_ID) | ||
| + | if alacritty ~= nil and alacritty: | ||
| + | alacritty: | ||
| + | else | ||
| + | local space = spaces.activeSpaceOnScreen() | ||
| + | local mainScreen = hs.screen.mainScreen() | ||
| + | if alacritty == nil and hs.application.launchOrFocusByBundleID(BUNDLE_ID) then | ||
| + | local appWatcher = nil | ||
| + | print(' | ||
| + | appWatcher = hs.application.watcher.new(function(name, | ||
| + | print(' | ||
| + | print(' | ||
| + | if event == hs.application.watcher.launched and app: | ||
| + | app:hide() | ||
| + | moveWindow(app, | ||
| + | print(" | ||
| + | appWatcher: | ||
| + | end | ||
| + | end) | ||
| + | print(' | ||
| + | appWatcher: | ||
| + | end | ||
| + | if alacritty ~= nil then | ||
| + | moveWindow(alacritty, | ||
| + | end | ||
| + | end | ||
| + | end) | ||
| + | </ | ||
| + | |||
| + | ===== Reference/ | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
