<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>
            
                    terminals on
                
            
            The Neo-Babbage Files</title>
        <link>https://babbagefiles.xyz/categories/terminals/</link>
        <description>Recent content  in terminals
            on The Neo-Babbage Files</description>
        <language>en-gb</language>
        
                <managingEditor>slade@lambda-y.net (Benjamin Slade)</managingEditor>
                <webMaster>slade@lambda-y.net (Benjamin Slade)</webMaster><lastBuildDate>Mon, 29 Dec 2025 11:00:32 +0000</lastBuildDate>
        <generator>Hugo -- gohugo.io</generator>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
            <atom:link href="https://babbagefiles.xyz/categories/terminals/index.xml" rel="self" type="application/rss&#43;xml" />
        
            
            <item>
                <title>Auto-sizing images in Kitty (if it fits it sits?)</title>
                <link>https://babbagefiles.xyz/auto-sizing-images-in-kitty-terminal/</link>
                
                
                <description>&lt;p&gt;I&amp;rsquo;ve been playing with &lt;a href=&#34;https://babbagefiles.xyz/categories/terminals/&#34;&gt;terminal emulators&lt;/a&gt; again for a while. More to
write up at some point, but here a quick note on some customisations
for displaying images in the terminal&amp;hellip;.&lt;/p&gt;
&lt;p&gt;There are a couple of terminal emulators which allow for display of
arbitrary images in the terminal (I mean, jpegs and pngs and the like,
not (just) &lt;a href=&#34;https://en.wikipedia.org/wiki/Sixel&#34;&gt;sixel&lt;/a&gt;), notably &lt;a href=&#34;https://sw.kovidgoyal.net/kitty&#34;&gt;Kitty&lt;/a&gt; and &lt;a href=&#34;https://wezterm.org&#34;&gt;WezTerm&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;WezTerm with iTerm2 compatible image protocol support, and built-in
&lt;a href=&#34;https://wezterm.org/cli/imgcat.html&#34;&gt;&lt;code&gt;imgcat&lt;/code&gt; command&lt;/a&gt;, &lt;strong&gt;alongside of (experimental but seemingly working)&lt;/strong&gt;
support for &lt;a href=&#34;https://sw.kovidgoyal.net/kitty/kittens/icat/&#34;&gt;Kitty&amp;rsquo;s image display protocol&lt;/a&gt; (enable this in WezTerm by
adding to your &lt;code&gt;wezterm.lua&lt;/code&gt; config the line
&lt;code&gt;enable_kitty_graphics=true&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;I mainly use &lt;a href=&#34;https://fishshell.com&#34;&gt;Fish shell&lt;/a&gt;, and here I record a couple of notes on
convenience customisations in Fish for working with in-terminal image
display in Kitty and WezTerm. But, I have a POSIX-compatible
(including Bash) version (less well tested) included below as well.&lt;/p&gt;
&lt;p&gt;WezTerm&amp;rsquo;s command to display an image in the terminal is &lt;code&gt;wezterm imgcat &amp;lt;/path/to/image/file&amp;gt;&lt;/code&gt;, and Kitty&amp;rsquo;s is &lt;code&gt;kitten icat &amp;lt;/path/to/image/file&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m playing with both terminals, and have a hard time remembering
things, so one thing I&amp;rsquo;ve done is to alias these commands in fish to
just &lt;code&gt;icat&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;More significantly, while WezTerm seems to have a smart auto-sizing of
the image to downsize the rendering to make sure the image fits fully
within the current terminal window, Kitty only seems to guarantee
downsized display to make sure the image fits the current width of the
terminal window, but does not downsize to fit the current height of
the terminal window.&lt;/p&gt;
&lt;p&gt;Thus, in Kitty, we get things like this:&lt;/p&gt;



&lt;figure&gt;
    
        &lt;img src=&#34;https://babbagefiles.xyz/auto-sizing-images-in-kitty-terminal/../ox-hugo/kitty-not-autosizing-image.png&#34;/&gt; &lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;(&amp;hellip;.hmm, boots aren&amp;rsquo;t a kitty&amp;hellip;)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;While in WezTerm, we get:&lt;/p&gt;



&lt;figure&gt;
    
        &lt;img src=&#34;https://babbagefiles.xyz/auto-sizing-images-in-kitty-terminal/../ox-hugo/wezterm-auto-sizing-image.png&#34;/&gt; &lt;/figure&gt;

&lt;p&gt;And with appropriate configuration from below added, the new
(easy-to-remember) &lt;code&gt;icat&lt;/code&gt; command works to produce in-terminal image
display as in WezTerm:&lt;/p&gt;



&lt;figure&gt;
    
        &lt;img src=&#34;https://babbagefiles.xyz/auto-sizing-images-in-kitty-terminal/../ox-hugo/kitty-with-new-icat-auto-sizing-image.png&#34;/&gt; &lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;(&amp;hellip;and there&amp;rsquo;s the kitty in Kitty!)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here are the relevant lines that can be added to your shell
configuration file to both make the image display command in both
Kitty and WezTerm both simply &lt;code&gt;icat&lt;/code&gt;, and also resize the display of the
image in Kitty to make sure it fits lengthwise in the current terminal
window:&lt;/p&gt;
&lt;h2 id=&#34;fish-shell&#34;&gt;Fish shell&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fish&#34; data-lang=&#34;fish&#34;&gt;&lt;span class=&#34;c&#34;&gt;#################### BEGIN image display things ######################
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;
&lt;span class=&#34;c&#34;&gt;# image display things for kitty [https://sw.kovidgoyal.net/kitty/]
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;#                        &amp;amp; wezterm [https://wezfurlong.org/wezterm/]
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;#
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;# - use &amp;#39;icat $path/to/image&amp;#39; (in either) to display image in terminal
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;# - on inner workings of the image display protocols, see:
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;#   - for kitty:    https://sw.kovidgoyal.net/kitty/kittens/icat/
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;#   - for wezterm:  https://wezterm.org/cli/imgcat.html
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;
&lt;span class=&#34;c&#34;&gt;# if we&amp;#39;re in kitty:
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$TERM&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;xterm-kitty&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
  &lt;span class=&#34;nb&#34;&gt;alias &lt;/span&gt;icat-full &lt;span class=&#34;s2&#34;&gt;&amp;#34;kitten icat&amp;#34;&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# alias the default kitty icat behaviour to `icat-full&amp;#39;
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;
  &lt;span class=&#34;c&#34;&gt;# function icat-auto
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; icat  &lt;span class=&#34;c&#34;&gt;# define auto-resizing version of kitty&amp;#39;s `icat&amp;#39;
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;# calculate kitty window size parameters:
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l kittysize &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;kitten icat --print-window-size&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# get kitty window size
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l kittywidth &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$kittysize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; cut -dx -f1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# extract width of kitty window
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l kittyheight &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$kittysize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; cut -dx -f2&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# extract height of kitty window
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l argcount &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;count&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;# count how argumnets to icat there are
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;
    &lt;span class=&#34;c&#34;&gt;# calculate target image size parameters: [requires ImageMagick!]
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l imagesize &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;identify -format &lt;span class=&#34;s1&#34;&gt;&amp;#39;%wx%h&amp;#39;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$argcount&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;]&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;c&#34;&gt;# `identify&amp;#39; is part of ImageMagick
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l imagewidth &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$imagesize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; cut -dx -f1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# extract width of image
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l imageheight &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$imagesize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; cut -dx -f2&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# extract height of image
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l reducebyy 1.0  &lt;span class=&#34;c&#34;&gt;# initialise and set to &amp;#39;100%&amp;#39; [no change] y-axis reduction percentage
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; -l reducebyx 1.0  &lt;span class=&#34;c&#34;&gt;# initialise and set to &amp;#39;100%&amp;#39; [no change] x-axis reduction percentage
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;
    &lt;span class=&#34;c&#34;&gt;# test if target image is bigger than kitty window
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$imageheight&lt;/span&gt; -gt &lt;span class=&#34;nv&#34;&gt;$kittyheight&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# if it&amp;#39;s taller than the terminal window
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;                                         &lt;span class=&#34;c&#34;&gt;# divide terminal window height by image height
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;      &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; reducebyy &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;math&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$kittyheight&lt;/span&gt; / &lt;span class=&#34;nv&#34;&gt;$imageheight&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$imagewidth&lt;/span&gt; -gt &lt;span class=&#34;nv&#34;&gt;$kittywidth&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  &lt;span class=&#34;c&#34;&gt;# if it&amp;#39;s widre than the terminal window
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;                                         &lt;span class=&#34;c&#34;&gt;# divide terminal window width by image width
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;      &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; reducebyx &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;math&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$kittywidth&lt;/span&gt; / &lt;span class=&#34;nv&#34;&gt;$imagewidth&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$reducebyy&lt;/span&gt; -lt &lt;span class=&#34;nv&#34;&gt;$reducebyx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  &lt;span class=&#34;c&#34;&gt;# set both reducebyx, reducebyy to smallest of 2 values
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;      &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; reducebyx &lt;span class=&#34;nv&#34;&gt;$reducebyy&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
      &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; reducebyy &lt;span class=&#34;nv&#34;&gt;$reducebyx&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;
    &lt;span class=&#34;c&#34;&gt;# calculate target image height and width to fit fully in terminal window
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; imageheight &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;math &lt;/span&gt;floor &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;math&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$reducebyy&lt;/span&gt; x &lt;span class=&#34;nv&#34;&gt;$imageheight&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;))&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; imagewidth &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;math &lt;/span&gt;floor &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;math&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$reducebyx&lt;/span&gt; x &lt;span class=&#34;nv&#34;&gt;$imagewidth&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;))&lt;/span&gt;

    &lt;span class=&#34;c&#34;&gt;# call the `kitten icat&amp;#39; kitty command using the calculated image size
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$argcount&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -gt &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;c&#34;&gt;# if the user has passed more args than just the target image filepath
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;                             &lt;span class=&#34;c&#34;&gt;# then pass all of those separately along with `--use-window-size&amp;#39; parameter
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;      &lt;span class=&#34;nb&#34;&gt;command &lt;/span&gt;kitten icat --use-window-size &lt;span class=&#34;nv&#34;&gt;$COLUMNS&lt;/span&gt;,&lt;span class=&#34;nv&#34;&gt;$LINES&lt;/span&gt;,&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$imagewidth&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;,&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$imageheight&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;1..&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;math&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;count&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; - 1&lt;span class=&#34;o&#34;&gt;)]&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;count&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)]&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
      &lt;span class=&#34;nb&#34;&gt;command &lt;/span&gt;kitten icat --use-window-size &lt;span class=&#34;nv&#34;&gt;$COLUMNS&lt;/span&gt;,&lt;span class=&#34;nv&#34;&gt;$LINES&lt;/span&gt;,&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$imagewidth&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;,&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$imageheight&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;1&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;

  &lt;span class=&#34;c&#34;&gt;# if we&amp;#39;re in WezTerm, alias `icat&amp;#39; to wezterm&amp;#39;s imgcat
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$TERM_PROGRAM&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;WezTerm&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
    &lt;span class=&#34;nb&#34;&gt;alias &lt;/span&gt;icat &lt;span class=&#34;s2&#34;&gt;&amp;#34;wezterm imgcat&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;c&#34;&gt;# NOTE: currently not sure best way of emulating kitty&amp;#39;s default image display behaviour
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;#      - mainly because I don&amp;#39;t know how to get the WezTerm window size in a
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;#        fashion that&amp;#39;s window-manager neutral and neutral between
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;#        graphical display protocol (i.e., X11 vs Wayland)
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;
    &lt;span class=&#34;c&#34;&gt;# draft version of default kitty icat-like behaviour for `imgcat&amp;#39;
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;# function icat-full
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;#   set -l imagesize (identify -format &amp;#39;%w&amp;#39; &amp;#34;$argv[$argcount]&amp;#34;)
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;# end
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;c&#34;&gt;# alias icat-full &amp;#34;wezterm imgcat --width 100%&amp;#34;
&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;

&lt;span class=&#34;c&#34;&gt;#################### END image display things ######################
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;posix-shell--including-bash&#34;&gt;POSIX shell (including Bash)&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#################### BEGIN image display things ######################&lt;/span&gt;

&lt;span class=&#34;c1&#34;&gt;# image display things for kitty [https://sw.kovidgoyal.net/kitty/]&lt;/span&gt;
&lt;span class=&#34;c1&#34;&gt;#                        &amp;amp; wezterm [https://wezfurlong.org/wezterm/]&lt;/span&gt;
#
&lt;span class=&#34;c1&#34;&gt;# - use &amp;#39;icat $path/to/image&amp;#39; (in either) to display image in terminal&lt;/span&gt;
&lt;span class=&#34;c1&#34;&gt;# - on inner workings of the image display protocols, see:&lt;/span&gt;
&lt;span class=&#34;c1&#34;&gt;#   - for kitty:    https://sw.kovidgoyal.net/kitty/kittens/icat/&lt;/span&gt;
&lt;span class=&#34;c1&#34;&gt;#   - for wezterm:  https://wezterm.org/cli/imgcat.html&lt;/span&gt;

&lt;span class=&#34;c1&#34;&gt;# if we&amp;#39;re in kitty:&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$TERM&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;xterm-kitty&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
    &lt;span class=&#34;nb&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;icat_full&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;kitten icat&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# alias the default kitty icat behaviour to `icat-full&amp;#39;&lt;/span&gt;

    icat &lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# define auto-resizing version of kitty&amp;#39;s `icat&amp;#39;&lt;/span&gt;
        &lt;span class=&#34;c1&#34;&gt;# calculate kitty window size parameters:&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;kittysize&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;kitten icat --print-window-size&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# get kitty window size&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;kittywidth&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$kittysize&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; cut -dx -f1&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# extract width of kitty window&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;kittyheight&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$kittysize&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; cut -dx -f2&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# extract height of kitty window&lt;/span&gt;

        &lt;span class=&#34;c1&#34;&gt;# calculate target image size parameters: [requires ImageMagick!]&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;icat_last_arg_pos&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;\${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$#&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;}&amp;#34;&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;icat_last_arg_content&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;eval&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$icat_last_arg_pos&lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;identify_command&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;identify -format &amp;#39;%wx%h&amp;#39; \&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$icat_last_arg_content&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\&amp;#34;&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# `identify&amp;#39; is part of ImageMagick&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;imagesize&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;eval&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$identify_command&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;imagewidth&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$imagesize&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; cut -dx -f1&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# extract width of image&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;imageheight&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$imagesize&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; cut -dx -f2&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# extract height of image&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;reducebyy&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# initialise and set to &amp;#39;100%&amp;#39; [no change] y-axis reduction percentage&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;reducebyx&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;100&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# initialise and set to &amp;#39;100%&amp;#39; [no change] x-axis reduction percentage&lt;/span&gt;

        &lt;span class=&#34;c1&#34;&gt;# test if target image is bigger than kitty window&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$imageheight&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -gt &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$kittyheight&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# if it&amp;#39;s taller than the terminal window&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
            &lt;span class=&#34;c1&#34;&gt;# divide terminal window height by image height&lt;/span&gt;
            &lt;span class=&#34;nv&#34;&gt;reducebyy&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$((&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt; kittyheight &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;100&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt; imageheight &lt;span class=&#34;k&#34;&gt;))&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$imagewidth&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -gt &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$kittywidth&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# if it&amp;#39;s wider than the terminal window&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
            &lt;span class=&#34;c1&#34;&gt;# divide terminal window width by image width&lt;/span&gt;
            &lt;span class=&#34;nv&#34;&gt;reducebyx&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$((&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt; kittywidth &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;100&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt; imagewidth &lt;span class=&#34;k&#34;&gt;))&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$reducebyy&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -lt &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$reducebyx&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# set both reducebyx, reducebyy to smallest of 2 values&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
            &lt;span class=&#34;nv&#34;&gt;reducebyx&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$reducebyy&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
            &lt;span class=&#34;nv&#34;&gt;reducebyy&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$reducebyx&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
        &lt;span class=&#34;c1&#34;&gt;# calculate target image height and width to fit fully in terminal window&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;imageheight&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$((&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt; reducebyy &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; imageheight &lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;100&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;))&lt;/span&gt;
        &lt;span class=&#34;nv&#34;&gt;imagewidth&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$((&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt; reducebyx &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; imagewidth &lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;100&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;))&lt;/span&gt;
        kitten icat --use-window-size &lt;span class=&#34;nv&#34;&gt;$COLUMNS&lt;/span&gt;,&lt;span class=&#34;nv&#34;&gt;$LINES&lt;/span&gt;,&lt;span class=&#34;nv&#34;&gt;$imagewidth&lt;/span&gt;,&lt;span class=&#34;nv&#34;&gt;$imageheight&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$@&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
    &lt;span class=&#34;c1&#34;&gt;# if we&amp;#39;re in WezTerm, alias `icat&amp;#39; to wezterm&amp;#39;s imgcat&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;elif&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$TERM_PROGRAM&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;WezTerm&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
    &lt;span class=&#34;nb&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;icat&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;wezterm imgcat&amp;#34;&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;

&lt;span class=&#34;c1&#34;&gt;#################### END image display things ######################&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;note-about-built-in-capacity&#34;&gt;Note about built-in capacity&lt;/h2&gt;
&lt;p&gt;I confirmed with the developer, &lt;a href=&#34;https://kovidgoyal.net/&#34;&gt;Kovid Goyal&lt;/a&gt;, that currently Kitty
does not have an &amp;ldquo;autofit&amp;rdquo; option (other than it&amp;rsquo;s default autofit to
fit width), see &lt;a href=&#34;https://github.com/kovidgoyal/kitty/issues/9201&#34;&gt;GitHub issue #9201&lt;/a&gt;. But Kovid seems to have gone ahead
and added a built-it &lt;code&gt;--fit&lt;/code&gt; option for Kitty, so a built-in way of
managing image display with respect to window size should be
available natively in an upcoming Kitty release.&lt;/p&gt;
</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/terminals">terminals</category>
                                
                            
                        
                     
                        
                     
                        
                    
                
                <guid>https://babbagefiles.xyz/auto-sizing-images-in-kitty-terminal/</guid>
                <pubDate>Sat, 08 Nov 2025 21:50:00 -0600</pubDate>
            </item>
        
            
            <item>
                <title>Linux Terminal Emulator Features and Hardware Compatibility</title>
                <link>https://babbagefiles.xyz/terminal-emulator-vtt-features-compatibility/</link>
                
                
                <description>&lt;p&gt;In a continuing series of, er, terminal-related posts, a look at some
features of a subset of terminal emulators on Linux.&lt;/p&gt;
&lt;p&gt;I mainly use &lt;a href=&#34;https://github.com/akermu/emacs-libvterm&#34;&gt;vterm inside of Emacs&lt;/a&gt;, usually via &lt;a href=&#34;https://babbagefiles.xyz/categories/equake/&#34;&gt;Equake&lt;/a&gt;, but sometimes
I do want to spawn a terminal outside of Emacs, and so I&amp;rsquo;ve been
curious about the properties of different terminals, including the
ability to be used across a wide range of hardware.&lt;/p&gt;
&lt;p&gt;A few weeks ago [as of 28 June 2022], I came across &lt;a href=&#34;https://tomscii.sig7.se/zutty/&#34;&gt;Zutty&lt;/a&gt;, which
describes itself as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Zutty is a terminal emulator for the X Window System, functionally similar to several other X terminal emulators such as xterm, rxvt and countless others. It is also similar to other, much more modern, GPU-accelerated terminal emulators such as Alacritty and Kitty. What really sets Zutty apart is its radically simple, yet extremely efficient rendering implementation, coupled with a sufficiently complete feature set to make it useful for a wide range of users. Zutty offers high throughput with low latency, and strives to conform to relevant (published or de-facto) standards.&lt;/p&gt;
&lt;p&gt;Zutty is written in straightforward C++ and only relies on OpenGL ES 3.1 for rendering&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Zutty page includes a link to a blog post &lt;a href=&#34;https://tomscii.sig7.se/2020/12/A-totally-biased-comparison-of-Zutty&#34;&gt;&amp;ldquo;A totally biased
comparison of Zutty (to some better-known X terminal emulators)&amp;quot;&lt;/a&gt;,
which includes some interesting discussion of features of different
terminal emulators, including comparison of VT support levels, and
discussion of why this could be important. A number of terminal
emulators, perhaps leaning towards &amp;ldquo;minimalism&amp;rdquo;, only implement
support up to VT220, or even lower, which creates inefficiencies in
certain cases:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The difference between implementing a VT400 or VT500 terminal (provided the implementations are correct) is relatively inconsequential. The same cannot be said of the gap between these and VT220-level terminals. Programs running in a less capable virtual terminal must sometimes use longer series of basic escape sequences to achieve the results of a fewer number of more modern ones. For example, the DECLRMM control sequence (set left-right margin mode) is available from the VT420 and up, and will be used to restrict scrolling to the active part of two horizontally split tmux panes. On less capable terminals, tmux is forced to perform more work to achieve the same result. This is quite similar to how extended instructions on modern CPUs allow machine code to be more efficient than code compiled for an older machine. In other words, not implementing a modern VT variant goes directly counter to greater efficiency. And there is yet another downgrade from VT220 to those terminals that only claim to support VT100/VT102.&lt;/p&gt;
&lt;p&gt;It is surprising how unambitious the newer terminals Alacritty and Kitty are in this regard. I would have hoped that new, supposedly state-of-the-art entrants would take the effort to add support for modern VT standards. Switching from xterm to Alacritty (or any other modern terminal) should not be a major downgrade.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Inspired by this, I copy/supplement the table on that page with some
additional comparison information, and a few additional terminal
emulators. As per the Zutty post, I use &lt;a href=&#34;https://invisible-island.net/vttest/&#34;&gt;VTTEST&lt;/a&gt; (originally written in
1983-1985 by Per Lindberg at the Stockholm University Computing
Center; in 1996 a new version written by Thomas E. Dickey, the
maintainer of &lt;a href=&#34;https://en.wikipedia.org/wiki/Xterm&#34;&gt;xterm&lt;/a&gt;). to check for reported VT support level. The
below table includes also whether the terminal emulator is
GPU-accelerated or not, and what the mininum &lt;a href=&#34;https://en.wikipedia.org/wiki/OpenGL&#34;&gt;OpenGL&lt;/a&gt; hardware support
is, as well as what display server is targeted (&lt;a href=&#34;https://en.wikipedia.org/wiki/X11&#34;&gt;X11&lt;/a&gt; or &lt;a href=&#34;https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)&#34;&gt;Wayland&lt;/a&gt; or
both).&lt;/p&gt;
&lt;p&gt;(&lt;strong&gt;Nb.&lt;/strong&gt;: see &lt;a href=&#34;./#note-on-gnome-terminal&#34;&gt;note on gnome-terminal and VT-capability&lt;/a&gt;.)&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;program&lt;/th&gt;
&lt;th&gt;tested version&lt;/th&gt;
&lt;th&gt;VT self-id&lt;/th&gt;
&lt;th&gt;GPU-accel&lt;/th&gt;
&lt;th&gt;minimum OpenGL&lt;/th&gt;
&lt;th&gt;DS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;zutty&lt;/td&gt;
&lt;td&gt;0.6&lt;/td&gt;
&lt;td&gt;VT520&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;ES 3.1&lt;/td&gt;
&lt;td&gt;X11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;terminology&lt;/td&gt;
&lt;td&gt;1.12.1&lt;/td&gt;
&lt;td&gt;VT510&lt;/td&gt;
&lt;td&gt;when possible&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;X11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;wezterm&lt;/td&gt;
&lt;td&gt;20220624&lt;/td&gt;
&lt;td&gt;VT500&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;3.3 (?)&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;xterm&lt;/td&gt;
&lt;td&gt;344&lt;/td&gt;
&lt;td&gt;VT420&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;X11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;kitty&lt;/td&gt;
&lt;td&gt;0.19.3&lt;/td&gt;
&lt;td&gt;VT220&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;3.3&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;foot&lt;/td&gt;
&lt;td&gt;1.12.1&lt;/td&gt;
&lt;td&gt;VT220&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;wayland&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;alacritty&lt;/td&gt;
&lt;td&gt;0.4.3&lt;/td&gt;
&lt;td&gt;VT102&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;3.3&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;st&lt;/td&gt;
&lt;td&gt;0.8.2&lt;/td&gt;
&lt;td&gt;VT102&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;X11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;urxt&lt;/td&gt;
&lt;td&gt;v9.22&lt;/td&gt;
&lt;td&gt;VT102&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;X11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;(lib)vterm&lt;/td&gt;
&lt;td&gt;0.1.4&lt;/td&gt;
&lt;td&gt;VT100/VT102&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gnome-terminal&lt;/td&gt;
&lt;td&gt;3.48.3&lt;/td&gt;
&lt;td&gt;VT510?(see &lt;a href=&#34;./#note-on-gnome-terminal&#34;&gt;note&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;no?&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;both&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;a href=&#34;https://codeberg.org/dnkl/foot&#34;&gt;Foot&lt;/a&gt; is another interesting new terminal emulator - targetting Wayland
only, and not GPU-accelerated, but with some design choices that make
it faster than GPU-accelerated terminal emulators in some cases, as
described in the wiki &lt;a href=&#34;https://codeberg.org/dnkl/foot/wiki/Performance&#34;&gt;&amp;ldquo;When is foot fast, and when is it not?&amp;quot;&lt;/a&gt;. One of
the things it does is &amp;ldquo;damage tracking&amp;rdquo;, i.e. only rendering cells
that have been updated, whereas e.g. alacritty rerenders everything
(though, as noted, &amp;ldquo;Alacritty renders empty cells really fast&amp;rdquo;). But
foot only supports up to VT220 (though alacritty only up to VT102!).&lt;/p&gt;
&lt;p&gt;The terminal emulator I end up using most is based on &lt;a href=&#34;https://www.leonerd.org.uk/code/libvterm/&#34;&gt;libvterm&lt;/a&gt;, this
is the library underlying Emacs&amp;rsquo; vterm, and claims to &amp;ldquo;implement[] a
VT220 or xterm-like terminal emulator&amp;rdquo;, but VTTEST seems to report as
VT102/VT100, at least inside of Emacs.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s no clear &amp;ldquo;best choice&amp;rdquo; here, even putting vterm aside (vterm
isn&amp;rsquo;t particularly fast, at least inside of Emacs (though it&amp;rsquo;s faster
than other Emacs terminal emulator choices like &lt;code&gt;ansi-term&lt;/code&gt;), doesn&amp;rsquo;t
have &amp;ldquo;very high&amp;rdquo; VT support; but it runs inside in Emacs, which offers
me a lot of advantages). Though alacritty, &lt;a href=&#34;https://st.suckless.org/&#34;&gt;st&lt;/a&gt;, and &lt;a href=&#34;https://en.wikipedia.org/wiki/Rxvt&#34;&gt;urxvt&lt;/a&gt; implement
only up to VT102 level features.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://codeberg.org/dnkl/foot&#34;&gt;Foot&lt;/a&gt;, &lt;a href=&#34;https://tomscii.sig7.se/zutty/&#34;&gt;Zutty&lt;/a&gt;, &lt;a href=&#34;https://sw.kovidgoyal.net/kitty/&#34;&gt;Kitty&lt;/a&gt;, and &lt;a href=&#34;https://github.com/alacritty/alacritty&#34;&gt;Alacritty&lt;/a&gt; are all fast, at least sometimes
(the Zutty biased comparison post above offers some additional
discussion on this, not including foot). They&amp;rsquo;re all limited in
various ways (hardware or display server - though Zutty apparently has
&lt;a href=&#34;https://github.com/tomszilagyi/zutty/wiki/FAQ&#34;&gt;experimental support for software rendering&lt;/a&gt;), with only Zutty having
&amp;ldquo;very high&amp;rdquo; VT support. (And Zutty has some &lt;a href=&#34;https://github.com/tomszilagyi/zutty/wiki/FAQ&#34;&gt;bells-and-whistles
limitations&lt;/a&gt;: no plans for transparency support, ligatures, bitmap
images (e.g. &lt;a href=&#34;https://en.wikipedia.org/wiki/Sixel&#34;&gt;SIXEL&lt;/a&gt;).)&lt;/p&gt;
&lt;p&gt;Foot runs on pretty much any hardware and has some nice features, but
is Wayland only (and limited in VT level support).&lt;/p&gt;
&lt;p&gt;Kitty and Alacritty require OpenGL 3.3 (on Intel hardware, this means
at least Intel HD Graphics 3000 (so 2011-era **20 ThinkPads or
later)).&lt;/p&gt;
&lt;p&gt;Zutty &amp;ldquo;runs on a wider range of graphics hardware by virtue of only
requiring &lt;a href=&#34;https://en.wikipedia.org/wiki/OpenGL_ES&#34;&gt;OpenGL ES&lt;/a&gt; as opposed to “desktop” OpenGL, and its resource
demands are otherwise minimal&amp;rdquo;, but it requires ES 3.1, which isn&amp;rsquo;t
supported by, for instance, Intel HD Graphics 3000.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/borisfaure/terminology&#34;&gt;Terminology&lt;/a&gt;, a terminal emulator which doesn&amp;rsquo;t seem to get talked
about as much, actually turns out to be a good choice across different
hardware. It can use GPU-acceleration, rendering using OpenGL or
OpenGL-ES2, but this is not a hard requirement. It offers VT510 level
support, and has lots of bells and whistles. I haven&amp;rsquo;t seen many speed
test comparisons with it, but in use it feels fast. (No native Wayland
support though, if that matters to you.)&lt;/p&gt;
&lt;h2 id=&#34;note-on-gnome-terminal&#34;&gt;Note on gnome-terminal:&lt;/h2&gt;
&lt;p&gt;gnome-terminal &lt;a href=&#34;https://tomscii.sig7.se/zutty/test/output/gnome-terminal/vt_06_04.png&#34;&gt;used to self-report &amp;ldquo;VT525&amp;rdquo;&lt;/a&gt; in VTTEST (back in 2022,
with v3.30.2), but self-described as VT220-compatible. But now (2025,
v.3.48.3) seems to self-report as &amp;ldquo;VT100&amp;rdquo;. [Actually, I&amp;rsquo;m wrong about
this. Or, it&amp;rsquo;s complicated: it says &amp;ldquo;VT100&amp;rdquo; family on one screen, and
&amp;ldquo;VT510&amp;rdquo; on another.]&lt;/p&gt;
&lt;p&gt;The Zutty post we&amp;rsquo;ve been talking about &lt;a href=&#34;https://tomscii.sig7.se/2020/12/A-totally-biased-comparison-of-Zutty#gnome-terminal&#34;&gt;identifies a whole host of
bugs in gnome-terminal&lt;/a&gt; and comments:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[&amp;hellip;there&amp;rsquo;s] &lt;em&gt;a steaming pile of bugs&lt;/em&gt; in various problem areas, some of
them pretty basic (such as TAB handling). Horizontal margins (VT420
and above) seem to be completely unsupported, as well as various other
sequences from VT420, VT520 and ISO-6429 (ECMA-48) – not entirely sure
if the latter is in scope. Overall, a puzzling outcome!&lt;/p&gt;
&lt;p&gt;Digging a bit further, I discovered some ambiguity on whether
gnome-terminal supports the claimed VT520 level at all: its &lt;a href=&#34;https://www.systutorials.com/docs/linux/man/1-gnome-terminal/&#34;&gt;manpage&lt;/a&gt;
(not organic to the project, but contributed by Debian) has this to
say about the support level of gnome-terminal: &lt;code&gt;Run any application that is designed to run on VT102, VT220, and xterm terminals.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;That is pretty sloppy as far as specifications go. Apparently, it
might be the case that nothing above VT220 is intentionally supported
by gnome-terminal at all, and that its primary device attributes
&lt;a href=&#34;https://tomscii.sig7.se/zutty/test/output/gnome-terminal/vt_06_04.png&#34;&gt;response&lt;/a&gt; is a &lt;em&gt;big fat lie&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Tom (of Zutty) refers to the &lt;a href=&#34;https://invisible-island.net/xterm/xterm.faq.html#bug_gnometerm&#34;&gt;xterm-faq&amp;rsquo;s page on gnome-terminal&lt;/a&gt; (and
gnome-terminal&amp;rsquo;s underlying &lt;a href=&#34;https://wiki.gnome.org/Apps/Terminal/VTE&#34;&gt;VTE terminal widget library&lt;/a&gt;) as well,
which documents extensive issues with gnome-terminal (and VTE) from
1999 onwards, summarising:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Unless specifically mentioned, GNOME Terminal and VTE&amp;rsquo;s issues
generally accumulate, with occasional veering off with skin-deep
“rewrites”. Each sighting provides a new episode.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But now (06 Nov 2025: gnome-terminal v3.48.3) it seems to only
self-report in VTTEST as &amp;ldquo;VT100 family&amp;rdquo; in [4.] Primary Device
Attributes (DA):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;Report is: &amp;lt;27&amp;gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; ? &lt;span class=&#34;m&#34;&gt;6&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; c  VT100 family
    &lt;span class=&#34;nv&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;132&lt;/span&gt; columns
    &lt;span class=&#34;nv&#34;&gt;21&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; horizontal scrolling
    &lt;span class=&#34;nv&#34;&gt;22&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; color
    &lt;span class=&#34;nv&#34;&gt;28&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; rectangular editing
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But as &amp;ldquo;VT510&amp;rdquo; in [5.] Secondary Device Attributes (DA):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;Testing Secondary Device Attributes &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;Firmware version&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;

          &amp;lt;27&amp;gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &amp;gt; &lt;span class=&#34;m&#34;&gt;6&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;7&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; c
         &lt;span class=&#34;nv&#34;&gt;Pp&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;61&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;VT510&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
         &lt;span class=&#34;nv&#34;&gt;Pv&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;7802, firmware version 780.2
         &lt;span class=&#34;nv&#34;&gt;Pc&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;1, ROM cartridge registration number ok
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;update-10-july-2022&#34;&gt;Update: 10 July 2022:&lt;/h2&gt;
&lt;p&gt;Added &lt;a href=&#34;https://wezfurlong.org/wezterm/&#34;&gt;WezTerm&lt;/a&gt; (another one written in Rust) which I haven&amp;rsquo;t really had
a chance to play with much, but it has good VT feature levels. It
seems to have the same OpenGL requirements as Kitty or Alacritty. This
seems a very good choice overall, with a lot of cool features,
including implementing Kitty&amp;rsquo;s display of images in terminal protocol
(along with iTerm2&amp;rsquo;s image display protocol), and
scripting/extensibility in Lua.&lt;/p&gt;
&lt;h2 id=&#34;update-06-nov-2025&#34;&gt;Update: 06 Nov 2025:&lt;/h2&gt;
&lt;p&gt;Should really add &lt;a href=&#34;https://ghostty.org&#34;&gt;Ghostty&lt;/a&gt; at some point (and update things in
general), which I was trying out for a while, but recent versions of
Ghostty require higher OpenGL-capable hardware than most of my
machines have.&lt;/p&gt;
&lt;p&gt;(Added &lt;a href=&#34;./#note-on-gnome-terminal&#34;&gt;above note on gnome-terminal&lt;/a&gt; as well.)&lt;/p&gt;
&lt;h2 id=&#34;update-21-dec-2025&#34;&gt;Update: 21 Dec 2025:&lt;/h2&gt;
&lt;p&gt;Updated corrections about gnome-terminal&amp;rsquo;s two differing reports
(VT100-family in primary attributes, but VT510 in secondary
attributes).&lt;/p&gt;
&lt;p&gt;Noticed a &amp;ldquo;new&amp;rdquo; terminal emulator, &lt;a href=&#34;https://gitlab.gnome.org/chergert/ptyxis&#34;&gt;ptyxis&lt;/a&gt;, when using a Fedora Atomic
spin. And, indeed, it bills itself as a &amp;ldquo;terminal for a
container-oriented desktop&amp;rdquo;. It seems to report like gnome-terminal,
which makes sense as they&amp;rsquo;re both really using Gnome&amp;rsquo;s VTE (discussed above).&lt;/p&gt;
</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/terminals">terminals</category>
                                
                            
                        
                     
                        
                     
                        
                    
                
                <guid>https://babbagefiles.xyz/terminal-emulator-vtt-features-compatibility/</guid>
                <pubDate>Tue, 28 Jun 2022 16:57:00 -0500</pubDate>
            </item>
        
            
            <item>
                <title>Towards a history of Quake-style drop-down terminals</title>
                <link>https://babbagefiles.xyz/quake-drop-down-terminal-history/</link>
                
                
                <description>&lt;p&gt;Continued work on fooling Emacs into behaving like a drop-down console
(i.e. &lt;a href=&#34;https://babbagefiles.xyz/categories/equake/&#34;&gt;Equake&lt;/a&gt;), set me to thinking about the development of
Quake-style drop-down terminals.&lt;/p&gt;
&lt;p&gt;The frequent label &amp;ldquo;Quake-style&amp;rdquo; does seem to suggest at least part of
the origin in the computer game &lt;a href=&#34;https://en.wikipedia.org/wiki/Quake_(video_game)&#34;&gt;Quake&lt;/a&gt; (1996), or at least that the drop-down console in
Quake was the most prominent/remembered example of this sort of UI.[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt0t&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt0b&#34;&gt;0&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;On Linux/Unix, a number of terminal emulators have been designed with
Quake-style drop-down interaction, and other platforms now seem to
have these as well. As far as I can tell, drop-down terminal emulators
first appeared on Linux, and probably in the early 2000s. (Though I
wonder about this, both the KDE project started in 1996 (same year as
Quake) and the GNOME project shortly after and it almost feels like
someone must have thought about doing something of this sort between
1996-2000.)&lt;/p&gt;
&lt;p&gt;The earliest surviving drop-down terminals on Linux seem to be
&lt;a href=&#34;https://github.com/KDE/yakuake&#34;&gt;Yakuake&lt;/a&gt; (QT/KDE), &lt;a href=&#34;https://github.com/lanoxx/tilda&#34;&gt;Tilda&lt;/a&gt; (GTK), and &lt;a href=&#34;https://github.com/Guake/guake&#34;&gt;Guake&lt;/a&gt; (GTK).&lt;/p&gt;
&lt;p&gt;Yakuake seems to have been released in the early 2000s, certainly by
2005[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt1t&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt1b&#34;&gt;1&lt;/a&gt;], but perhaps a bit earlier. Tilda was released by 2006[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt2t&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt2b&#34;&gt;2&lt;/a&gt;]. Guake
was explicitly inspired by the original author seeing
Yakuake[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt3t&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt3b&#34;&gt;3&lt;/a&gt;], itself being released in 2007.&lt;/p&gt;
&lt;p&gt;But &amp;ldquo;Yakuake&amp;rdquo; stands for &amp;ldquo;yet another Kuake&amp;rdquo;, and indeed the earliest
drop-down terminal I can find on Linux is &lt;a href=&#34;https://web.archive.org/web/20040219101722/http://www.nemohackers.org/kuake.php&#34;&gt;Kuake&lt;/a&gt;, released probably by 2003,
with the last update in 2004[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt4t&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt4b&#34;&gt;4&lt;/a&gt;].&lt;/p&gt;
&lt;p&gt;Happy to hear about further history of early drop-down Quake-style
terminals on any platform.&lt;/p&gt;
&lt;p&gt;[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt0b&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt0t&#34;&gt;0&lt;/a&gt;] &lt;a href=&#34;https://en.wikipedia.org/wiki/Console_(computer_games)&#34;&gt;https://en.wikipedia.org/wiki/Console_(computer_games)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt1b&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt1t&#34;&gt;1&lt;/a&gt;] &lt;a href=&#34;https://web.archive.org/web/20051016011941/http://yakuake.uv.ro/&#34;&gt;https://web.archive.org/web/20051016011941/http://yakuake.uv.ro/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt2b&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt2t&#34;&gt;2&lt;/a&gt;] &lt;a href=&#34;https://web.archive.org/web/20061028182927/http://tilda.sourceforge.net/wiki/index.php/Main_Page&#34;&gt;https://web.archive.org/web/20061028182927/http://tilda.sourceforge.net/wiki/index.php/Main_Page&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt3b&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt3t&#34;&gt;3&lt;/a&gt;] &lt;a href=&#34;https://news.ycombinator.com/item?id=22524552&#34;&gt;https://news.ycombinator.com/item?id=22524552&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[&lt;span class=&#34;org-target&#34; id=&#34;org-target--ddt4b&#34;&gt;&lt;/span&gt;&lt;a href=&#34;#org-target--ddt4t&#34;&gt;4&lt;/a&gt;]
&lt;a href=&#34;https://web.archive.org/web/20040219101722/http://www.nemohackers.org/kuake.php&#34;&gt;https://web.archive.org/web/20040219101722/http://www.nemohackers.org/kuake.php&lt;/a&gt;&lt;/p&gt;
</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/terminals">terminals</category>
                                
                            
                        
                     
                        
                     
                        
                    
                
                <guid>https://babbagefiles.xyz/quake-drop-down-terminal-history/</guid>
                <pubDate>Sun, 26 Jun 2022 20:19:00 -0600</pubDate>
            </item>
        
    </channel>
</rss>


