Crossplatform 터미널 : Alacritty

최근 Windows 11에서 wsl 혹은 리눅스 연결을 위해서 powershell에서 ssh 명령을 사용했었다.

윈도우 계열에서도 다양한 터미널들이 있는데 여기서는 크로스 플랫폼 alacritty 를 정리했다.

alacritty 는 사용의 편의를 원하면 config 를 수동으로 잘해야 한다. (설정 파일 편집 필요)


설치와 사용

https://github.com/alacritty/alacritty

윈도우11에서 winget 을 사용할 수 있어서 winget 으로 설치했다.

1
2
3
4
winget search alacritty

#
winget install alacritty

Windows 설정

설정에 대해서 https://alacritty.org/config-alacritty.html 에 정리되어 있다.

  • 여기서는 windows 11 만 대상으로 한다.
  1. 설정 파일 위치

    • %APPDATA%\alacritty\alacritty.toml
  2. 설정 파일은 toml (ini) 형식의 문법을 사용

  3. 대부분의 편의를 위한 것은 설정에 지정해야 한다.


쉘 선택

Modern PowerShell 7+ (pwsh)

1
2
3
[shell]
program = "pwsh.exe"
args = ["-NoLogo"]

Windows PowerShell 5.1 (powershell)

1
2
3
[shell]
program = "powershell.exe"
args = ["-NoLogo"]

쉘 시작 위치 (PowerShell 기준)

powershell 을 사용하면 systemd32 아래에서 시작한다. 다음 같이 위치를 지정할 수 있다.

  1. PowerShell 7+ (pwsh) 기준toml[shell]
1
2
3
[shell]
program = "pwsh.exe"
args = ["-NoLogo", "-NoExit", "-Command", "Set-Location $env:USERPROFILE"]
  1. Windows PowerShell 5.1 기준toml[shell]
1
2
3
[shell]
program = "powershell.exe"
args = ["-NoLogo", "-NoExit", "-Command", "Set-Location $env:USERPROFILE"]

마우스 복사

드래그로 선택한 내용 복사

1
2
[selection]
save_to_clipboard = true

마우스 오른쪽 버튼을 복사 기능으로 변경 (mouse)일반적으로 마우스 오른쪽 버튼은 ‘붙여넣기’로 설정되어 있지만, 아래와 같이 커스텀 매핑을 추가하면 오른쪽 클릭으로 ‘복사’를 수행할 수 있다:

1
2
3
4
[[mouse.bindings]]

mouse = "Right"
action = "Copy"

샘플

alacritty 사용하며 처음 설정 값.

1
2
3
4
5
6
7
8
[general]

[window]
startup_mode = "Fullscreen"

[terminal.shell]
program = "pwsh.exe"
args = ["-NoLogo", "-NoExit", "-Command", "Set-Location $env:USERPROFILE"]