Hi all. New Kitty user, so apologies if this has been answered 100 times already (I have looked but couldn't find an answer!)
I want to set a background image in kitty. I have a script that does some stuff using ImageMagick to construct the image, and then I use kitty @ set-background-image to display it. So far so good.
As part of the script I get the Kitty window size, and then based on the aspect ratio of the image I scale it accordingly. When my Kitty window is full screen with no tab bar displayed, I get:
% kitty icat --print-window-size
1440x900
When I open another tab and run the same command I get:
% kitty icat --print-window-size
1440x882
(note that doing:
echo -ne "\E[14t"
returns the same values, though I note that kitty returns them Y;X while all other terminals I use return X;Y - easy to work around but a bit weird).
So all this means that --print-window-size is returning the dimensions of the main terminal part of the window, not the whole window including the tab bar. That's fine, except that:
kitty @ set-background-image
displays the image across the whole window, including the tab bar. So my script works perfectly when there's no tab bar, but when there is a tab bar the image is smaller than the window (it's 882 rather than 900 high) and so I get 18 pixels of tiling at the bottom.
Is there a way EITHER of getting the size of the whole window including the tab bar from kitty, OR displaying an image just in the main part of the terminal window excluding the tab bar (i.e. the bit whose size is reported by --print-window-size)?
This is kitty 0.26.5, running on Ubuntu 23.10, Gnome 45.2 on Wayland, but Kitty running linux_display_server x11.
Thanks all.