Skip to content

Instantly share code, notes, and snippets.

@dzungtran89
Last active December 5, 2023 12:53
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dzungtran89/82fcaa3c218dd9bddceeef57ad509b0b to your computer and use it in GitHub Desktop.
Save dzungtran89/82fcaa3c218dd9bddceeef57ad509b0b to your computer and use it in GitHub Desktop.
Quick config for wsl2 + alacritty

Prerequisites

Config

Alacritty configuration is put in the dir %APPDATA%\alacritty, use explorer to create one if the dir is not existed

In order to have Alacritty starting wsl2 as default at your HOME dir, please update the shell key in the config

shell:
  program: "wsl.exe ~ -d <wsl_name>"

Example config as below:

# Configuration for Alacritty, the GPU enhanced terminal emulator.

## Import files (Colors, Fonts, Etc)
## Comment this section if you don't need it
import:
  - C:\Users\trand\AppData\Roaming\alacritty\fonts.yml
  - C:\Users\trand\AppData\Roaming\alacritty\keys.yml

env:
  # TERM: alacritty
  # https://github.com/jwilm/alacritty/issues/2566
  LC_CTYPE: en_US.UTF-8

window:
  decorations: full
  startup_mode: Windowed

scrolling:
  history: 5000

  # Scrolling distance multiplier.
  multiplier: 3

## Cursor
cursor:
  style:
    shape: Block
    blinking: On

  unfocused_hollow: false

## Live config reload
live_config_reload: true

background_opacity: 0.9

shell:
  program: "wsl.exe ~ -d Ubuntu-20.04"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment