-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
This escape sequence outputs the current terminal's window size in pixels.
The output appears as user input in the prompt and requires a read
command to store it’s output.
This is supported in all VTE based terminals, XTerm, URxvt, iTerm2 and
many others so it makes sense for Kitty to support it as well.
Neofetch uses this escape sequence to correctly size and place the image
inside of the terminal window (Neofetch has fallbacks for when this
sequence isn’t supported but they depend on an X server).
Neofetch recently added support for kitty icat and this works when an X
server is running (thanks to the fallbacks above). However it fails on
macOS as the escape sequence is not supported.
There is a way of using osascript on macOS to query the window size but
this requires the user to accept a dialog that appears on first run. Kitty
supporting the sequence directly would make this feature transparent for
users.
Cheers 👍