wezterm
wezterm copied to clipboard
Wezterm can't find bg image when open from terminal
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I have configured my setup to use an image as background. That works when I open wezterm normally with the .lnk file. But it doesn't work when I open wezterm from the terminal using both wezterm.exe or wezterm-gui.exe, it just opens with a transparent bg and can't find the image (check log below). The bg image is in C:\Program Files\WezTerm. I'm on Windows 10 if that matters.
To Reproduce
Open wezterm from a terminal using wezterm.exe or wezterm-gui.exe. It doesn't matter if it's cmd or one of the powershells.
Configuration
config.default_cwd = wezterm.home_dir .. "\\repos"
config.default_prog = { "wsl.exe", "--cd", "~/repos" }
config.window_decorations = "RESIZE"
local background_image = ".\\wallpaper_clean_mini.jpeg"
local scheme = wezterm.color.get_builtin_schemes()["Catppuccin Mocha"]
config.background = {
{
source = { File = background_image },
horizontal_align = "Center",
vertical_align = "Middle",
},
{
source = { Color = scheme.background },
height = "100%",
width = "100%",
opacity = 0.7,
},
}
Expected Behavior
Wezterm should open with the bg image if opened from the terminal.
Logs
21:59:01.052 ERROR wezterm_gui::termwindow::background > Failed to load background: getting metadata for .\wallpaper_clean_mini.jpeg: The system cannot find the file specified. (os error 2)
Anything else?
No response