Restore du5t domain, fix new-connection tab bug, add GPU backend menu
- Restore du5t as the default SSH domain (was removed in 9f6ca7b)
- New SSH domains aren't known to the running mux until wezterm-gui
fully restarts, so AttachDomain silently no-ops and no tab appears.
Fall back to spawning a plain ssh command tab in that case so the
connection is usable immediately.
- Add a graphics backend picker (OpenGL/WebGpu/Software) under
other settings.
- Default front_end to OpenGL: WebGpu has a widely-reported upstream
bug where window_background_opacity doesn't apply correctly
(wezterm#5790, #6359, #4502), which is why transparency wasn't
taking effect.
This commit is contained in:
69
wezterm.lua
69
wezterm.lua
@@ -142,6 +142,12 @@ end)
|
|||||||
-- SSH 도메인: 자주 접속하는 원격 서버를 wezterm이 네이티브로 관리
|
-- SSH 도메인: 자주 접속하는 원격 서버를 wezterm이 네이티브로 관리
|
||||||
-- 실제 서버 정보가 준비되면 아래 예시를 복사해서 채우세요.
|
-- 실제 서버 정보가 준비되면 아래 예시를 복사해서 채우세요.
|
||||||
config.ssh_domains = {
|
config.ssh_domains = {
|
||||||
|
{
|
||||||
|
name = "du5t",
|
||||||
|
remote_address = "172.30.1.41:228",
|
||||||
|
username = "gm",
|
||||||
|
multiplexing = "None",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Unix domain (mux server): wezterm을 서버로 띄워두면 터미널 껐다 켜도 세션 유지
|
-- Unix domain (mux server): wezterm을 서버로 띄워두면 터미널 껐다 켜도 세션 유지
|
||||||
@@ -651,6 +657,30 @@ local function show_connection_settings(window, pane)
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- WebGpu는 GPU/드라이버 조합에 따라 window_background_opacity(투명도)가 제대로 반영되지
|
||||||
|
-- 않는 알려진 문제가 있다 (wezterm#5790, #6359, #4502 등). 문제가 재발하면 여기서 OpenGL로
|
||||||
|
-- 돌려서 투명도를 확인해볼 수 있게 그래픽 백엔드를 메뉴에서 바로 바꿀 수 있게 한다.
|
||||||
|
local function show_graphics_backend_menu(window, pane)
|
||||||
|
window:perform_action(
|
||||||
|
act.InputSelector({
|
||||||
|
title = "그래픽 백엔드 (현재: " .. tostring(config.front_end) .. ")",
|
||||||
|
fuzzy = true,
|
||||||
|
choices = {
|
||||||
|
{ label = "🟢 OpenGL (투명도 정상 동작, 안정적 - 권장)", id = "OpenGL" },
|
||||||
|
{ label = "🟡 WebGpu (일부 GPU에서 투명도 깨짐)", id = "WebGpu" },
|
||||||
|
{ label = "⚪ Software (GPU 미사용, 다른 방법 실패 시 최후 수단)", id = "Software" },
|
||||||
|
},
|
||||||
|
action = wezterm.action_callback(function(inner_window, inner_pane, backend_id)
|
||||||
|
if not backend_id then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
set_config_value(inner_window, inner_pane, "front_end", string.format("%q", backend_id))
|
||||||
|
end),
|
||||||
|
}),
|
||||||
|
pane
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
local function show_other_settings(window, pane)
|
local function show_other_settings(window, pane)
|
||||||
window:perform_action(
|
window:perform_action(
|
||||||
act.InputSelector({
|
act.InputSelector({
|
||||||
@@ -659,6 +689,7 @@ local function show_other_settings(window, pane)
|
|||||||
choices = {
|
choices = {
|
||||||
{ label = "📜 스크롤백 줄 수", id = "scrollback" },
|
{ label = "📜 스크롤백 줄 수", id = "scrollback" },
|
||||||
{ label = "⚡ 최대 FPS", id = "max_fps" },
|
{ label = "⚡ 최대 FPS", id = "max_fps" },
|
||||||
|
{ label = "🖥️ 그래픽 백엔드", id = "backend" },
|
||||||
{ label = "⬆️ 탭바 위치: 상단", id = "tab_top" },
|
{ label = "⬆️ 탭바 위치: 상단", id = "tab_top" },
|
||||||
{ label = "⬇️ 탭바 위치: 하단", id = "tab_bottom" },
|
{ label = "⬇️ 탭바 위치: 하단", id = "tab_bottom" },
|
||||||
{ label = "✅ 창 닫기 확인 켜기", id = "close_prompt" },
|
{ label = "✅ 창 닫기 확인 켜기", id = "close_prompt" },
|
||||||
@@ -669,6 +700,8 @@ local function show_other_settings(window, pane)
|
|||||||
prompt_config_value(inner_window, inner_pane, "스크롤백 줄 수", "scrollback_lines", config.scrollback_lines, false)
|
prompt_config_value(inner_window, inner_pane, "스크롤백 줄 수", "scrollback_lines", config.scrollback_lines, false)
|
||||||
elseif id == "max_fps" then
|
elseif id == "max_fps" then
|
||||||
prompt_config_value(inner_window, inner_pane, "최대 FPS", "max_fps", config.max_fps, false)
|
prompt_config_value(inner_window, inner_pane, "최대 FPS", "max_fps", config.max_fps, false)
|
||||||
|
elseif id == "backend" then
|
||||||
|
show_graphics_backend_menu(inner_window, inner_pane)
|
||||||
elseif id == "tab_top" then
|
elseif id == "tab_top" then
|
||||||
set_config_value(inner_window, inner_pane, "tab_bar_at_bottom", "false")
|
set_config_value(inner_window, inner_pane, "tab_bar_at_bottom", "false")
|
||||||
elseif id == "tab_bottom" then
|
elseif id == "tab_bottom" then
|
||||||
@@ -746,8 +779,39 @@ local function show_main_menu(window, pane)
|
|||||||
|
|
||||||
local domain_name = id:match("^domain:(.+)$")
|
local domain_name = id:match("^domain:(.+)$")
|
||||||
if domain_name then
|
if domain_name then
|
||||||
|
-- SSH 도메인은 wezterm-gui 프로세스가 시작할 때 딱 한 번만 mux에 등록된다.
|
||||||
|
-- 방금 추가한 도메인은 ReloadConfiguration으로는 mux에 반영되지 않아서
|
||||||
|
-- AttachDomain을 호출해도 아무 일도 안 일어난다(탭이 안 뜨는 원인). 이 경우
|
||||||
|
-- wezterm-gui 완전 재시작 전까지 임시로 일반 ssh 명령을 새 탭에 띄워 우회한다.
|
||||||
|
local mux_domain = wezterm.mux.get_domain(domain_name)
|
||||||
|
if mux_domain then
|
||||||
-- SpawnTab 대신 AttachDomain 사용 이유는 update-right-status 훅 근처 주석 참고
|
-- SpawnTab 대신 AttachDomain 사용 이유는 update-right-status 훅 근처 주석 참고
|
||||||
inner_window:perform_action(act.AttachDomain(domain_name), inner_pane)
|
inner_window:perform_action(act.AttachDomain(domain_name), inner_pane)
|
||||||
|
else
|
||||||
|
local target
|
||||||
|
for _, domain in ipairs(config.ssh_domains or {}) do
|
||||||
|
if domain.name == domain_name then
|
||||||
|
target = domain
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if target then
|
||||||
|
local host, port = split_remote_address(target.remote_address)
|
||||||
|
local args = { "ssh" }
|
||||||
|
if port then
|
||||||
|
table.insert(args, "-p")
|
||||||
|
table.insert(args, port)
|
||||||
|
end
|
||||||
|
table.insert(args, target.username .. "@" .. host)
|
||||||
|
inner_window:perform_action(act.SpawnCommandInNewTab({ args = args }), inner_pane)
|
||||||
|
notify(
|
||||||
|
inner_window,
|
||||||
|
"'" .. domain_name .. "'는 아직 wezterm에 등록되지 않아 일반 ssh로 접속했습니다.\n"
|
||||||
|
.. "wezterm-gui.exe를 완전히 재시작하면 네이티브 연결(멀티플렉싱)을 쓸 수 있습니다.",
|
||||||
|
8000
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
elseif id == "settings" then
|
elseif id == "settings" then
|
||||||
show_settings_menu(inner_window, inner_pane)
|
show_settings_menu(inner_window, inner_pane)
|
||||||
end
|
end
|
||||||
@@ -948,7 +1012,10 @@ config.launch_menu = {
|
|||||||
-- ============================================================
|
-- ============================================================
|
||||||
-- [7] 렌더링 / 성능
|
-- [7] 렌더링 / 성능
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
config.front_end = "WebGpu" -- GPU 가속 렌더러 (문제 있으면 "OpenGL" 또는 "Software"로 변경)
|
-- WebGpu는 GPU/드라이버 조합에 따라 window_background_opacity(투명도)가 적용되지 않는
|
||||||
|
-- 알려진 문제가 있어(wezterm#5790, #6359, #4502) 투명도가 정상 동작하는 OpenGL을 기본값으로 둔다.
|
||||||
|
-- 설정 > 기타 설정 > 그래픽 백엔드 메뉴에서 언제든 WebGpu/Software로 바꿀 수 있다.
|
||||||
|
config.front_end = "OpenGL"
|
||||||
config.webgpu_power_preference = "HighPerformance"
|
config.webgpu_power_preference = "HighPerformance"
|
||||||
config.max_fps = 120
|
config.max_fps = 120
|
||||||
config.animation_fps = 60
|
config.animation_fps = 60
|
||||||
|
|||||||
Reference in New Issue
Block a user