-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow stacking images when using unicode placeholders #6400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Your approach (2) is not feasible. The way unicode placeholders work is Some random thoughts on approach 1: Having image placements that track existing ones is potentially do-able, From a protocol design perspective, I don't see why this should be So if you are interested in designing such a protocol extension I will |
Alright I'll start to look into it this weekend, I'll let you know if I have any questions. |
Closing feel free to continue the conv. |
Sorry for the late update, I haven't really had time lately, but I'm still working on this and I have a basic prototype working. Implementation wise, I think long lookup chains are unavoidable if we want the flexibility of moving around part of an image chain (ie. move only c, d in the a <- b <- c <- d chain). |
Is your feature request related to a problem? Please describe.
The app I am using this for, twitch-tui, is displaying images in between text, using them as emojis.
Before unicode placeholders were available I had to keep track of the position of the text and move the images accordingly.
Now that they are available it simplifies my code a lot, but it's missing a feature I was using, stacking images by specifying a z-index.
Describe the solution you'd like
I was thinking of two possible solutions to this problem:
Specify another image to stay at the same position of when displaying an image.
ex:
<ESC>_Ga=p,i=<image id>,p=<placement id>,z=<z-index>,b=<image id>,c=<placement id>;
Where b is the id, and c is the placement id of the other image to "stick" to.
This would allow to display the first image with unicode placeholders, and the rest of images with a display command.
b and c are examples of the keys that could be used, I haven't checked if they're available.
Join unicode placeholders with a zero width space.
ex:
\e[38;5;42m\U10EEEE\U0305\U10EEEE\U200B\e[38;5;43m\U10EEEE\U0305\U10EEEE
This would display the image with id 42 at z-index 0 and the image with id 43 at z-index 1.
I don't know if this one is possible.
I am not familiar with the codebase at all so I might have missed some better way to do this, please let me know.
I'm open to try to make a PR if no one is interested in doing so.
The text was updated successfully, but these errors were encountered: