Terminal background not updated when image file content changes #8471
Labels
Area-Settings
Issues related to settings and customizability, for console or terminal
Area-TerminalControl
Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)
Needs-Tag-Fix
Doesn't match tag requirements
Needs-Triage
It's a new issue that the core contributor team needs to triage at the next triage meeting
Product-Terminal
The new Windows Terminal.
Resolution-Won't-Fix
We're just really obstinate about this. There's probably a good reason.
Environment
Steps to reproduce
Keep WT opened. Change settings.json, add background-image, save json. Image gets applied to running terminal window. Open image and change it without changing json - doesn't get updated. Add a space to json, save (to have new date modified) - still doesn't change background.
Expected behavior
Simply, if asset used for background-image (and I assume other assets like icons and similar) change, wt.exe should pick it up. Or at least provide a key or right-click function to force-reload the config and all assets used in it.
Actual behavior
Nothing happens, even though image file itself has new content. Restarting wt.exe will load a new asset, but that means losing session.
More details of what I'm doing
I was pondering if to open a new issue, or use #8231 , as base issue seems the same. But not to pollute the other issue, I'm opening this one, if need be merge them if you deem needed.
Anyway, I'm working on a crude way to update background in terminal depending on what I'm doing. Eg. if I SSH to server No.1, change wallpaper to show Ubuntu logo + IP/hostname of the server here I'm connected. Then when I disconnect and connect to other server No.2, switch logo to CentOS + new IP/hostname. I know I could in theory have a profile for each server, but with almost hundred profiles, it wouldn't be very productive.
So I've made a Powershell script that can change wallpaper and append text to it, so in theory I can make it a module and a function, and instead calling
ssh [email protected]
Id' just be calling something likeFancyWtSsh -IP 10.10.10.10
which would establish connection and change the wallpaper.Thing is, if I use
DynamicImage.png
in settings.json and I change the content of the image on the fly, wallpaper doesn't reload. Just changing time modified of settings.json doesn't trigger the change either, if the image name is still the same. Even adding random space somewhere in config (like a comment) won't cause a reload, as long as the image name is still the same. So I literally need to change something likebackground-image: 10.10.10.10.png
tobackground-image: 10.10.10.20.png
whenever I change hosts, which makes it too much trouble, I can just as well then have a profile for each server with it's own image and scroll through them endlessly, as I wouldn't want to touch settings.json all that much, certainly not in a scripted way (call me cautios).To tie into the issue as reported in #8231, similar thing probably happens with wallpaper changes. If you have rotating wallpapers on desktop, and wt.exe using those, when desktop rotates, pointer to image name stays the same, but content of the image asset changes, and wt.exe doesn't pick that up. So hopefully, we can squash multiple issues with one fix, and try to detect date/time of any asset that's used by settings.json, and update live terminal accordinly. Or if that's not the solution, even a simple "F5" style of keybinding that force-reloads config would be good enough in my case. It's not perfect, but it's a workaround I'm OK with.
The text was updated successfully, but these errors were encountered: