wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.7k stars 748 forks source link

How to use dark mica effect in light system mode? #5873

Open bling-yshs opened 1 month ago

bling-yshs commented 1 month ago

I usually set my Windows to light mode, but I want to set the Mica effect of wezterm to dark mica (after all, no one would want a light-colored terminal). How can I achieve this? I would be very grateful if someone could answer this!

My current configuration file:

local wezterm = require 'wezterm'
local mux = wezterm.mux

local config = {
    -- 默认启动的程序
    default_prog = {"C:/abys/software/msys2/msys2_shell.cmd", '-defterm', '-here', '-no-start'},
    -- 默认字体
    font = wezterm.font 'MesloLGS NF',
    -- 光标样式
    default_cursor_style = 'SteadyBar',
    -- 颜色主题
    color_scheme = 'Dark',
    -- 窗口装饰器
    window_decorations = "RESIZE",
    -- 隐藏标题栏
    hide_tab_bar_if_only_one_tab = false,
    -- 隐藏标签栏索引
    show_tab_index_in_tab_bar = false,
    -- 窗口透明度
    window_background_opacity = 0.0,
    -- 背景模糊
    win32_system_backdrop = 'Mica',
    -- 不提示关闭窗口
    window_close_confirmation = 'NeverPrompt',
    keys = {{
        key = 'q',
        mods = 'CTRL',
        action = wezterm.action.CloseCurrentPane {
            confirm = false
        }
    }},
    initial_rows = 25,
    initial_cols = 90
}

wezterm.on('mux-is-process-stateful', function(proc)
    return false
end)

wezterm.on("gui-startup", function(cmd)
    local tab, pane, window = mux.spawn_window(cmd or {})
    local gui = window:gui_window()
    local screen = wezterm.gui.screens().active
    local width = (screen.width - 922) / 2
    local height = (screen.height - 605) / 2
    gui:set_position(width, height)
end)

return config

image

victorz commented 2 weeks ago

no one would want a light-colored terminal

I would, when I'm using light mode. 🙃 Dark mode -> dark terminal; light mode -> light terminal.

But everyone is different, I suppose.

Daydreamer-riri commented 2 weeks ago

I have the same problem, which bothers me a lot.