LoginSignup
2

More than 3 years have passed since last update.

[MEMO][TERMINAL] Alacritty

Last updated at Posted at 2020-02-04

はじめに

クラスプラットフォームなRust製でGPUアクセラレイトでdotfileでカスタマイズできる進んでるターミナルでgitのお星様2万個のお墨付きをもらっているので

開発環境

Ubuntu

Install

sudo add-apt-repository ppa:mmstick76/alacritty
sudo apt install alacritty

設定

ウィンドウサイズ

~/.config/alacritty/alacritty.ymlを設定します

解像度とDPIを知る

xdpyinfo G -B 2 resolution

screen #0:
  dimensions:    2560x1440 pixels (677x381 millimeters)
  resolution:    96x96 dots per inch
小さめ
window:
  dimensions:
    columns: 80 # 横幅 (単位はDPI)
    lines: 30 # 縦幅 
大きめ
window:
  dimensions:
    # 解像度 2560x1440 の設定
    columns: 116 # 横幅 (単位はDPI)
    lines: 100 # 縦幅 
CLIで設定
alacritty -d [columns] [lines]

ウィンドウの表示位置

左寄せ
window: 
  dimensions:
    columns: ...
    lines: ...
  position:
    x: 0  
    y: 0
右寄せ
# --snip---
  # 解像度 2560x1440 の場合
  position: 1275
    x: 0

フォントスタイル

~/.config/alacritty/alacritty.yml
# Font configuration (changes require restart)
font:
  # The normal (roman) font face to use.
  normal:
    family: Ubuntu Mono
    # Style can be specified to pick a specific face.
    style: Regular

  # The bold font face
  bold:
    family: Ubuntu Mono
    # Style can be specified to pick a specific face.
    # style: Bold

  # The italic font face
  italic:
    family: Ubuntu Mono
    # Style can be specified to pick a specific face.
    # style: Italic

  size: 14.0

Theme

ダーク系

~/.config/alacritty/alacritty.yml
# Colors (Monokai Dark)
colors:
  # Default colors
  primary:
    background: '0x272822'
    foreground: '0xF8F8F2'

  # Normal colors
  normal:
   black:   '0x272822'
   red:     '0xF92672'
   green:   '0xA6E22E'
   yellow:  '0xF4BF75'
   blue:    '0x66D9EF'
   magenta: '0xAE81FF'
   cyan:    '0xA1EFE4'
   white:   '0xF8F8F2'

  # Bright colors
  bright:
   black:   '0x75715E'
   red:     '0xF92672'
   green:   '0xA6E22E'
   yellow:  '0xF4BF75'
   blue:    '0x66D9EF'
   magenta: '0xAE81FF'
   cyan:    '0xA1EFE4'
   white:   '0xF9F8F5'

ライト系

~/.config/alacritty/alacritty.yml
# Colors (Pencil Light)
colors:
 # Default Colors
 primary:
   background: '#f1f1f1'
   foreground: '#424242'
 # Normal colors
 normal:
   black:   '#212121'
   red:     '#c30771'
   green:   '#10a778'
   yellow:  '#a89c14'
   blue:    '#008ec4'
   magenta: '#523c79'
   cyan:    '#20a5ba'
   white:   '#e0e0e0'
 # Bright colors
 bright:
   black:   '#212121'
   red:     '#fb007a'
   green:   '#5fd7af'
   yellow:  '#f3e430'
   blue:    '#20bbfc'
   magenta: '#6855de'
   cyan:    '#4fb8cc'
   white:   '#f1f1f1'

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2