How to set my own background image?
touero opened this issue · 4 comments
I tried to delete all png images in backdrops
, and then put my own images into them, but it didn't work. I would like to ask if there are any requirements for image format, name, etc.
Also, if I want to customize the theme based on this, how can I do it?
The only requirement for the images should be image file type. (List of supported file types according to the docs).
Could you try checking if the images can be loaded if the file path is manually set in config/appearance.lua
Try changing line 17 to something like this source = { File = wezterm.config_dir .. '/backdrops/IMAGE_FILE.png' },
wezterm-config/config/appearance.lua
Lines 15 to 19 in e45e047
This is just to check if the images are renderable by WezTerm.
As for theme generator, that might bit tricky 😅.
The only way I see that working is by
- Creating a new utility that runs after the
BackDrops
utility - ReadS the global variable
wezterm.GLOBAL.background
(set byBackDrops
) for image file path - Passes file path to a separate program that can scan the image and output the colours of the image
- Parse the output of the said program and generate a new
colors
option table
It's a bit convoluted but that's the only way I see that working.
The hardest part would probably be finding/making an image-scanning cli program that can output the colors in a usable and consistent format.
You'd also have a noticeable delay every time WezTerm starts up if it has to sample images to generate a new colorscheme before starting up.
thanks