ucollage icon indicating copy to clipboard operation
ucollage copied to clipboard

doesn't work in Suckless' tabbed

Open GasparVardanyan opened this issue 3 years ago • 3 comments

When I use ucollage in a plain st window, it works fine, but when I use ucollage in a st instance embedded in a tabbed window, ucollage doesn't draw images.

GasparVardanyan avatar May 15 '21 10:05 GasparVardanyan

I can reproduce the problem with xterm using tabbed.

I am confident that the problem is with how ueberzug draws images. What happens is that they are drawn on the parent window.

If you explicitly run tabbed -c xterm -into (or the st variant) in a terminal window, xterm in tabbed mode opens. If you run ucollage inside that new window, you will notice that the images are drawn on the parent window and the text is drawn correctly on the new window. So ueberzug draws the images on the window of the tabbed command and not on its child.

15-05-2021_15 26-56 15-05-2021_15 27-03

I am not really sure what information is passed when a program is executed with tabbed, so I don't think there is an immediate fix for this.

In any case, I don't think the solution can come by changing something in the ucollage code.

ckardaris avatar May 15 '21 12:05 ckardaris

First of all, thank you for the app! I like it a lot.

This is just to confirm that this happens also when you open a terminal inside Vim/Neovim. Images are shown on the left-hand side even if the terminal is in a vertical split on the right. However, and this may be interesting in relation to this issue, this does not happen when the terminal is moved to the left. So, it seems that ucollage renders images on the left in the terminal no matter what.

euglevi avatar May 20 '21 13:05 euglevi

I think it works as expected based on the model I have in mind. ueberzug will draw the images on the X window. It can't differentiate between splits. ucollage will read correctly the terminal size but the drawings will be relative to the whole window and consequently it's upper left part.

The split part could maybe be made to work if we had a way to determine the the current split provided. It's really interesting. Let me think about that.

In any case modifying ueberzug would make more sense. But hacks are fun, so at some point I may give a try to the split terminal issue

ckardaris avatar May 20 '21 14:05 ckardaris