<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/osc.c, branch 1.17.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.17.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.17.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-02-06T12:55:30Z</updated>
<entry>
<title>osc: 176 (app-id): implement query+reply</title>
<updated>2024-02-06T12:55:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T12:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4b075bb0750754f219704b99486605ee81634c7b'/>
<id>urn:sha1:4b075bb0750754f219704b99486605ee81634c7b</id>
<content type='text'>
Applications can now query for the current app-id with:

    \E] 176 ; ? \E\\

The reply is

    \E] 176 ; &lt;title&gt; \E\\
</content>
</entry>
<entry>
<title>osc: add support for osc 176 (app ID)</title>
<updated>2024-02-06T12:50:09Z</updated>
<author>
<name>delthas</name>
<email>delthas@dille.cc</email>
</author>
<published>2023-09-04T12:02:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6c56b04b3f312be8dcee307e29515f3c83b3ae87'/>
<id>urn:sha1:6c56b04b3f312be8dcee307e29515f3c83b3ae87</id>
<content type='text'>
This adds support for a new OSC escape sequence: OSC 176, that lets
terminal programs tell the terminal the name of the app that is
running. foot then sets the app ID of the toplevel to that ID,
which lets the compositor know which app is running, and typically
sets the appropriate icon, window grouping, ...

See: https://gist.github.com/delthas/d451e2cc1573bb2364839849c7117239
</content>
</entry>
<entry>
<title>Don't use fancy Unicode quotes, stick to ASCII</title>
<updated>2024-02-06T11:36:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T11:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7999975016a57cc0a2c2e20bc55f29de32df7044'/>
<id>urn:sha1:7999975016a57cc0a2c2e20bc55f29de32df7044</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: store column of FTCS_COMMAND_{EXECUTED,FINISHED} in row struct</title>
<updated>2024-02-06T11:12:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-08T09:46:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e9607de5ae2eaf1a57924bb282a660150eca6eb5'/>
<id>urn:sha1:e9607de5ae2eaf1a57924bb282a660150eca6eb5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: move row-&gt;prompt_marker into new struct, row-&gt;shell_integration</title>
<updated>2024-02-06T11:12:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-08T09:35:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f8e875a7cddaac91818b98993d17a96d09a5b4a5'/>
<id>urn:sha1:f8e875a7cddaac91818b98993d17a96d09a5b4a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>util: add streq() function and use in place of strcmp(...) == 0</title>
<updated>2024-02-05T11:09:52Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-01-24T23:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e0f3703ae6c4084f9275cfc78d87e5604cc27a10'/>
<id>urn:sha1:e0f3703ae6c4084f9275cfc78d87e5604cc27a10</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: update font subpixel mode, and window opaque compositor hint, on alpha changes</title>
<updated>2023-05-26T08:01:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-05-25T16:39:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c51050a9bc16b231de964156cd3ffd20ee12569e'/>
<id>urn:sha1:c51050a9bc16b231de964156cd3ffd20ee12569e</id>
<content type='text'>
When background alpha is changed at runtime (using OSC-11), we (may)
have to update the opaque hint we send to the compositor.

We must also update the subpixel mode used when rendering font
glyphs.

Why?

When the window is fully opaque, we use wl_surface_set_opaque_region()
on the entire surface, to hint to the compositor that it doesn’t have
to blend the window content with whatever is behind the
window. Obviously, if alpha is changed from opaque, to transparent (or
semi-transparent), that hint must be removed.

Sub-pixel mode is harder to explain, but in short, we can’t do
subpixel hinting with a (semi-)transparent background. Thus, similar
to the opaque hint, subpixel antialiasing must be enabled/disabled
when background alpha is changed.
</content>
</entry>
<entry>
<title>osc: add support for OSC 133;A (prompt markers)</title>
<updated>2022-06-16T17:02:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-06-15T16:44:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bdb79e8b9fb36f627bb204ce2060dd5a877f3712'/>
<id>urn:sha1:bdb79e8b9fb36f627bb204ce2060dd5a877f3712</id>
<content type='text'>
This patch adds support for the OSC-133;A sequence, introduced by
FinalTerm and implemented by iTerm2, Kitty and more. See
https://iterm2.com/documentation-one-page.html#documentation-escape-codes.html.

The shell emits the OSC just before printing the prompt. This lets the
terminal know where, in the scrollback, there are prompts.

We implement this using a simple boolean in the row struct ("this row
has a prompt"). The prompt marker must be reflowed along with the text
on window resizes.

In an ideal world, erasing, or overwriting the cell where the OSC was
emitted, would remove the prompt mark. Since we don't store this
information in the cell struct, we can't do that. The best we can do
is reset it in erase_line(). This works well enough in the "normal"
screen, when used with a "normal" shell. It doesn't really work in
fullscreen apps, on the alt screen. But that doesn't matter since we
don't support jumping between prompts on the alt screen anyway.

To be able to jump between prompts, two new key bindings have been
added: prompt-prev and prompt-next, bound to ctrl+shift+z and
ctrl+shift+x respectively.

prompt-prev will jump to the previous, not currently visible, prompt,
by moving the viewport, ensuring the prompt is at the top of the
screen.

prompt-next jumps to the next prompt, visible or not. Again, by moving
the viewport to ensure the prompt is at the top of the screen. If
we're at the bottom of the scrollback, the viewport is instead moved
as far down as possible.

Closes #30
</content>
</entry>
<entry>
<title>osc: avoid unnecessary calls to strlen(3)</title>
<updated>2022-04-06T16:19:47Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2022-04-06T00:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0d1e6960af35ab4aa289e4e0c2443320e2a3adb0'/>
<id>urn:sha1:0d1e6960af35ab4aa289e4e0c2443320e2a3adb0</id>
<content type='text'>
Checking for specific strings of length 0 or 1 can be done with e.g.:

    if (str[0] == '\0') {...}
    if (str[0] == '?' &amp;&amp; str[1] == '\0') {...}

Doing it this way instead of using strlen(3) means we avoid the
function call overhead and also avoid scanning through more of the
string than is neceessary.

A compiler could perhaps optimize away calls to strlen(3) when the
result is compared to a small constant, but GCC 11.2 only seems to
actually do this[1] for lengths of 0.

[1]: https://godbolt.org/z/qxoW8qqW6
</content>
</entry>
<entry>
<title>osc: use four digits in OSC-4 and OSC-11  rgb:r/g/b replies</title>
<updated>2022-03-13T18:44:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-03-13T08:05:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3cefe78b40b6210dd1991989b800344813c9bd85'/>
<id>urn:sha1:3cefe78b40b6210dd1991989b800344813c9bd85</id>
<content type='text'>
Closes #971
</content>
</entry>
<entry>
<title>osc: grow OSC buffer exponentially instead of by fixed increments of 128</title>
<updated>2022-03-02T01:55:25Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2022-03-02T01:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a3c5e8927de8ba8c763230c7e1015bf7fad83ebc'/>
<id>urn:sha1:a3c5e8927de8ba8c763230c7e1015bf7fad83ebc</id>
<content type='text'>
With fixed increments of 128 bytes, an OSC 52 copy operation could end
up doing thousands or tens of thousands of realloc(3) calls just to
copy a few MB.
</content>
</entry>
<entry>
<title>osc: don’t damage the entire view on a single color palette update</title>
<updated>2022-02-10T19:09:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-10T17:27:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d34c8007f164741b488063fe7cb44e8566e1cdf2'/>
<id>urn:sha1:d34c8007f164741b488063fe7cb44e8566e1cdf2</id>
<content type='text'>
Instead, loop the viewport and dirty only those cells that are
affected by the palette change.
</content>
</entry>
<entry>
<title>osc: implement OSC-22 - set xcursor pointer</title>
<updated>2022-02-07T16:28:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-01-01T12:58:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6cdaa4fd0a60b6b1d6cc4a9464dcc720533e644f'/>
<id>urn:sha1:6cdaa4fd0a60b6b1d6cc4a9464dcc720533e644f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: store color index, not actual color, in cell’s fg/bg attributes</title>
<updated>2021-12-26T11:37:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-25T16:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c2bf2d3650b6a837efec834d23b1c3774c263852'/>
<id>urn:sha1:c2bf2d3650b6a837efec834d23b1c3774c263852</id>
<content type='text'>
When using indexed colors (i.e. SGR 30/40/90/100), store the index
into the cell’s fg/bg attributes, not the actual color value.

This has a couple of consequences:

Color table lookup is now done when rendering. This means a rendered
cell will always reflect the *current* color table, not the color
table that was in use when the cell was printed to.

This simplifies the OSC-4/104 logic, since we no longer need to update
the grid - we just have to damage it to trigger rendering.

Furthermore, this change simplifies the VT parsing, since we no longer
need to do any memory loads (except loading the SGR parameter values),
only writes.
</content>
</entry>
<entry>
<title>osc-4: don’t update the color of cells with RGB fg/bg colors</title>
<updated>2021-12-01T19:07:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-30T18:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a3016a6cc909d9c383359a4eaafd30bcd52bd272'/>
<id>urn:sha1:a3016a6cc909d9c383359a4eaafd30bcd52bd272</id>
<content type='text'>
OSC 4/104 changes the 256-color palette. We also run a pass over the
visible cells, and update their colors.

This was previously done by comparing the actual color of the cell,
with the “old” color in the palette. If they matched, the cell was
updated.

This meant that cells with an RGB color (i.e. not a palette based
color) was also updated, _if_ its color matched the palette color.

Now that each cell tracks its color *source*, we can ignore all
non-palette based cells.

Note that this still isn’t perfect: if the palette contains multiple
entries with the same color, we’ll end up updating the “wrong” cells.

Closes #678
</content>
</entry>
<entry>
<title>term: track cell color source</title>
<updated>2021-11-20T15:46:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-20T15:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d46af6bd7ac7606bf99d63b2453b656a5defb892'/>
<id>urn:sha1:d46af6bd7ac7606bf99d63b2453b656a5defb892</id>
<content type='text'>
Each cell now tracks it’s current color source:

* default fg/bg
* base16 fg/bg (maps to *both* the regular and bright colors)
* base256 fg/bg
* RGB

Note that we don’t have enough bits to separate the regular from the
bright colors. These _shouldn’t_ be the same, so we ought to be
fine...
</content>
</entry>
<entry>
<title>Merge branch 'parse-rgb-strlen'</title>
<updated>2021-10-20T17:59:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-20T17:59:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=174f8870c75df87e4603455d8025676259fde108'/>
<id>urn:sha1:174f8870c75df87e4603455d8025676259fde108</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: use STRLEN() macro to make parse_rgb() more self-documenting</title>
<updated>2021-10-20T16:05:36Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-10-20T16:05:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2e878892792e36f47a8ed5caea7bd56c75c1c626'/>
<id>urn:sha1:2e878892792e36f47a8ed5caea7bd56c75c1c626</id>
<content type='text'>
The empty literals in the macro are to ensure the argument itself
is a string literal, so it can't be used on anything else.
</content>
</entry>
<entry>
<title>osc: use BEL terminator in OSC replies to BEL-terminated OSC queries</title>
<updated>2021-10-20T11:48:37Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-10-20T11:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=52dcf72d0b80b9f4c159744447b34d215a38d24c'/>
<id>urn:sha1:52dcf72d0b80b9f4c159744447b34d215a38d24c</id>
<content type='text'>
This matches the documented (and observed) behavior in xterm:

&gt; XTerm accepts either BEL or ST for terminating OSC sequences, and
&gt; when returning information, uses the same terminator used in a query

-- https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
</content>
</entry>
<entry>
<title>osc: fix typo in LOG_DBG() message</title>
<updated>2021-07-24T00:58:34Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-07-24T00:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0a22183fdff105779c7896daa2563aec958ffc4c'/>
<id>urn:sha1:0a22183fdff105779c7896daa2563aec958ffc4c</id>
<content type='text'>
</content>
</entry>
</feed>
