본문 바로가기
리눅스

WezTerm

by 다움위키 2024. 8. 7.

원문 보기: https://dawoum.duckdns.org/wiki/WezTerm

 

WezTermAlacrittyKitty (terminal emulator)와 함께 자주 언급되는 GPU-가속 터미널 에뮬레이터입니다.

Installation

데비안 저장소에서 제공하지 않기 때문에, 홈페이지의 안내에 따라 설치할 수 있습니다.

개발자가 제공하는 저장소로부터 직접 설치할 수 있습니다:

  • curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg
  • echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list
  • sudo apt update
  • sudo apt install wezterm

또는

  • sudo apt install wezterm-nightly

또는 다른 방법, 예를 들어, Flatpak, AppImage, 등을 이용해서 설치할 수 있습니다.

latest development version

홈페이지의 정보에 따라 진행할 수 있습니다. 여기서는 git 저장소에서 소스를 받아서 설치할 예정입니다.

Configuration

설정이 lua 파일을 직접 수정해야 하기 때문에, 생각보다는 어렵습니다.

어쨌든, 여기저기서 제공하는 설정이 있으니, 참고해서 설정할 수 있습니다.

  • mkdir -p ~/.config/wezterm
  • touch ~/.config/wezterm/wezterm.lua
local wezterm = require 'wezterm';

return {
  -- option	= value	, [default] comment
  enable_wayland = false, -- 창 모양새를 유지하기 위해, 그리고, 한글 입력기를 사용하기 위해, 

  -- Fonts
  font     	= wezterm.font("D2CodingLigature Nerd Font")                             	
  -- font  	= wezterm.font("JetBrains Mono", {weight="Bold",italic=true})
  font_size	= 13.5                                                      

  -- Colors
  color_scheme     	= "nord"   	, -- full list @ wezfurlong.org/wezterm/colorschemes/index.html
  colors           	= {        	  -- color_scheme takes precedence over these
    foreground     	= "silver" 	, -- [silver] The default text color
    background     	= "black"  	, -- [black]  The default background color
    cursor_bg      	= "#52ad70"	, -- [#52ad70] Overrides the cell background color when the current cell is occupied by the cursor and the cursor style is set to Block
    cursor_fg      	= "black"  	, -- [black]   Overrides the text color when the current cell is occupied by the cursor
    cursor_border  	= "#52ad70"	, -- [#52ad70] Specifies the border color of the cursor when the cursor style is set to Block, of the color of the vertical or horizontal bar when the cursor style is set to Bar or Underline.
    selection_fg   	= "black"  	, -- [black]   The foreground color of selected text
    selection_bg   	= "#fffacd"	, -- [#fffacd] The background color of selected text
    scrollbar_thumb	= "#222222"	, -- [#222222] The color of the scrollbar "thumb"; the portion that represents the current viewport
    split          	= "#444444"	, -- [#444444] The color of the split lines between panes
  --   ansi        	= {"black", "maroon", "green", "olive", "navy", "purple", "teal", "silver"},
  --   brights     	= {"grey", "red", "lime", "yellow", "blue", "fuchsia", "aqua", "white"},
  --   indexed     	= {[136]="#af8700"} , -- Arbitrary colors of the palette in the range from 16 to 255
  },

  -- Appearance
  window_background_opacity   	= 0.9  	, -- [1.0] alpha channel value with floating point numbers in the range 0.0 (meaning completely translucent/transparent) through to 1.0 (meaning completely opaque)
  enable_tab_bar              	= false	, -- [true]
  hide_tab_bar_if_only_one_tab	= false	, -- [false] hide the tab bar when there is only a single tab in the window
  initial_rows = 19,
  initial_cols = 80,
  use_ime = true,
  xim_im_name = 'nimf',
}

위 설정은 Wayland 환경에서 사용하지만, 님프 한글입력기를 사용하기 위해, wayland를 비활성화하고, xim의 입력기를 사용하는 설정입니다.

그놈 Wayland에서, 님프 한글 입력기에서는 위 설정으로도 입력이 가능했지만, kime 입력기에서는 GDK_BACKEND=x11이라는 환경 변수를 주어야 한글 입력이 가능합니다.