<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.c, branch 1.27.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.27.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.27.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2026-03-21T13:43:27Z</updated>
<entry>
<title>term: enqueue data to slave if there are queued paste data buffers</title>
<updated>2026-03-21T13:43:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-03-21T13:43:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=037a2f4fa2c6fab014248d62efa8a6e14f617832'/>
<id>urn:sha1:037a2f4fa2c6fab014248d62efa8a6e14f617832</id>
<content type='text'>
When writing paste data to the terminal (either interactively, or as
an OSC-52 reply), we enqueue other data (key presses, for examples, or
query replies) while the paste is happening.

The idea is to send the key press _after_ all paste data has been
written, to ensure consistency.

Unfortunately, we only checked for an on-going paste. I.e. where the
paste itself hasn't yet finished. It is also possible the paste itself
has finished, but we haven't yet flushed all the paste buffers. That
is, if we were able to *receive* paste data faster than the terminal
client was able to *consume* it. In this case, we've queued up paste
data in the terminal. These are in separate queues, and when emitting
e.g. a key press, we didn't check if all _those_ queues had been
flushed yet.

Closes #2307
</content>
</entry>
<entry>
<title>Add support for background blur</title>
<updated>2026-03-02T08:39:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-10-16T11:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dea10e2e48162c6ab48ca564ceeca88dea886a04'/>
<id>urn:sha1:dea10e2e48162c6ab48ca564ceeca88dea886a04</id>
<content type='text'>
This patch adds a new config option: colors{,2}.blur=no|yes. When
enabled, transparent background are also blurred.

Note that this requires the brand new ext-background-effect-v1
protocol, and specifically, that the compositor implements the blur
effect.
</content>
</entry>
<entry>
<title>Spawning new terminal with --config from parent instance</title>
<updated>2026-03-02T08:16:36Z</updated>
<author>
<name>Stéphane Klein</name>
<email>contact@stephane-klein.info</email>
</author>
<published>2026-01-08T23:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dc0c8550c38ffd0983789573a1a0d4417016c2c7'/>
<id>urn:sha1:dc0c8550c38ffd0983789573a1a0d4417016c2c7</id>
<content type='text'>
Reference: https://codeberg.org/dnkl/foot/issues/1622
Signed-off-by: Stéphane Klein &lt;contact@stephane-klein.info&gt;
</content>
</entry>
<entry>
<title>config: add [colors-dark] and [colors-light], replacing [colors] and [colors2]</title>
<updated>2025-12-20T14:51:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-12-19T08:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cf2b390f6e096e7a2ca93d4dece153eb13261a2e'/>
<id>urn:sha1:cf2b390f6e096e7a2ca93d4dece153eb13261a2e</id>
<content type='text'>
The main reason for having two color sections is to be able to switch
between dark and light. Thus, it's better if the section names reflect
this, rather than the more generic 'colors' and 'colors2' (which was
the dark one and which was the light one, now again?)

When the second color section was added, we kept the original name,
colors, to make sure we didn't break existing configurations, and
third-party themes.

However, in the long run, it's probably better to be specific in the
section naming, to avoid confusion.

So, add 'colors-dark', and 'colors-light'. Keep 'colors' and 'colors2'
as aliases for now, but mark them as deprecated. They WILL be removed
in a future release.

Also rename the option values for initial-color-theme, from 1/2, to
dark/light. Keep the old ones for now, marked as deprecated.

Update all bundled themes to use the new names. In the light-only
themes (i.e. themes that define a single, light, theme), use
colors-light, and set initial-color-theme=light.

Possible improvements: disable color switching if only one color
section has been explicitly configured (todo: figure out how to handle
the default color theme values...)
</content>
</entry>
<entry>
<title>term: mouse SGR mode: don't emit negative CSI values</title>
<updated>2025-12-13T08:56:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-12-10T08:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6e533231b016684a32a1975ce2e33ae3ae38b4c6'/>
<id>urn:sha1:6e533231b016684a32a1975ce2e33ae3ae38b4c6</id>
<content type='text'>
When reporting the column/row pixel value in mouse SGR mode, we
emitted negative values when the cursor was being dragged outside the
window.

Unfortunately, negative values aren't allowed in CSI parameters, as
'-' is an intermediate value.

It was done this way, to be consistent with XTerm behavior. Allegedly,
XTerm has changed its behavior in patch 404.

With that in mind, and seeing that foot has never emitted negative
values in any other mouse mode, let's stop emitting negative values in
SGR mode too.

Closes #2226
</content>
</entry>
<entry>
<title>term: reverse-scroll: fix crash when viewport ends up outside the (new) scrollback</title>
<updated>2025-12-13T08:55:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-12-10T07:48:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=65bd79b77d0acf3fcf6be1ecfe5a4a3ce2e1151a'/>
<id>urn:sha1:65bd79b77d0acf3fcf6be1ecfe5a4a3ce2e1151a</id>
<content type='text'>
If the viewport has been scrolled up, it is possible for a
reverse-scroll (rin) to cause the viewport to point to lines outside
the scrollback. This is an issue if the scrollback isn't full, since
in that case, the viewport will contain NULL lines. This will
potentially trigger assertions in a couple of different places.

Example backtrace:

    #2 0x555555cd230c in bug ../../debug.c:44
    #3 0x555555ad485e in grid_row_in_view ../../grid.h:83
    #4 0x555555b15a89 in grid_render ../../render.c:3465
    #5 0x555555b3b0ab in fdm_hook_refresh_pending_terminals ../../render.c:5165
    #6 0x555555a74980 in fdm_poll ../../fdm.c:435
    #7 0x555555ac2b85 in main ../../main.c:676

Detect when this happens, and force-move the viewport to ensure it is
valid.

Closes #2232
</content>
</entry>
<entry>
<title>render: when double-buffering, pre-apply previous frame's damage early</title>
<updated>2025-10-10T08:23:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-10-05T08:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=299186a6547f6e038ee6f3822caf9a0fdfabceef'/>
<id>urn:sha1:299186a6547f6e038ee6f3822caf9a0fdfabceef</id>
<content type='text'>
Foot likes it when compositor releases buffer immediately, as that
means we only have to re-render the cells that have changed since the
last frame.

For various reasons, not all compositors do this. In this case, foot
is typically forced to switch between two buffers, i.e. double-buffer.

In this case, each frame starts with copying over the damage from the
previous frame, to the new frame. Then we start rendering the updated
cells.

Bringing over the previous frame's damage can be slow, if the changed
area was large (e.g. when scrolling one or a few lines, or on full
screen updates). It's also done single-threaded. Thus it not only
slows down frame rendering, but pauses everything else (i.e. input
processing). All in all, it reduces performance and increases input
latency.

But we don't have to wait until it's time to render a frame to copy
over the previous frame's damage. We can do that as soon as the
compositor has released the buffer (for the frame _before_ the
previous frame). And we can do this in a thread.

This frees up foot to continue processing input, and reduces frame
rendering time since we can now start rendering the modified cells
immediately, without first doing a large memcpy(3).

In worst case scenarios (or perhaps we should consider them best case
scenarios...), I've seen up to a 10x performance increase in frame
rendering times (this obviously does *not* include the time it takes
to copy over the previous frame's damage, since that doesn't affect
neither input processing nor frame rendering).

Implemented by adding a callback mechanism to the shm abstraction
layer. Use it for the grid buffers, and kick off a thread that copies
the previous frame's damage, and resets the buffers age to 0 (so that
foot understands it can start render to it immediately when it later
needs to render a frame).

Since we have certain way of knowing if a compositor releases buffers
immediately or not, use a bit of heuristics; if we see 10 consecutive
non-immediate releases (that is, we reset the counter as soon as we do
see an immediate release), this new "pre-apply damage" logic is
enabled. It can be force-disabled with tweak.pre-apply-damage=no.

We also need to take care to wait for the thread before resetting the
render's "last_buf" pointer (or we'll SEGFAULT in the thread...).

We must also ensure we wait for the thread to finish before we start
rendering a new frame. Under normal circumstances, the wait time is
always 0, the thread has almost always finished long before we need to
render the next frame. But it _can_ happen.

Closes #2188
</content>
</entry>
<entry>
<title>term: osc8: tag *all* cells in a multi-column character as an URI</title>
<updated>2025-10-04T07:24:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-10-04T07:24:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=80951ab7a6b3bcc4dd3c30a5454bf648d3d9ed93'/>
<id>urn:sha1:80951ab7a6b3bcc4dd3c30a5454bf648d3d9ed93</id>
<content type='text'>
When we print a character to the grid, we must also update its OSC-8
state if an OSC-8 URI is currently active.

For double-width characters, this was only being done for the first
cell.

This causes the labels in URL mode to be off, as the link was
effectively chopped up into multiple pieces.

Closes #2179
</content>
</entry>
<entry>
<title>Revert "term: erase: use erase_line() whenever a range corresponds to a full line"</title>
<updated>2025-10-04T05:21:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-10-04T05:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1dfa86c93ac3585b1b8b6ff3d8617176a57942c3'/>
<id>urn:sha1:1dfa86c93ac3585b1b8b6ff3d8617176a57942c3</id>
<content type='text'>
This reverts commit 44a674edb86f2f8db3304d76faf567346dcd7d94.

It caused a regression with prompt markers, in at least fish+starship.
</content>
</entry>
<entry>
<title>term: erase: use erase_line() whenever a range corresponds to a full line</title>
<updated>2025-09-25T14:57:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-09-25T14:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=44a674edb86f2f8db3304d76faf567346dcd7d94'/>
<id>urn:sha1:44a674edb86f2f8db3304d76faf567346dcd7d94</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: no need to pass ptmx as stdout to utempter</title>
<updated>2025-09-09T15:34:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-09-09T15:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=efc39097e5a939c4e6f54bf80d24871bfeeaf80b'/>
<id>urn:sha1:efc39097e5a939c4e6f54bf80d24871bfeeaf80b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: make sure the color table is populated *before* the slave process is spawned</title>
<updated>2025-07-22T11:30:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-07-22T11:30:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=42be74214a0b2cd1b4245b262c99cbd5030a0e0c'/>
<id>urn:sha1:42be74214a0b2cd1b4245b262c99cbd5030a0e0c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term+input: refactor: move theme switching into term_theme_* functions</title>
<updated>2025-06-10T05:11:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-06-09T05:37:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=33eefa7b45c2d20750f5788dfdcc1008cf33ca47'/>
<id>urn:sha1:33eefa7b45c2d20750f5788dfdcc1008cf33ca47</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cursor-shape: add 'dnd-ask' and 'all-resize'</title>
<updated>2025-05-22T04:59:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-21T13:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=664cdcc65cf42ab269ea4a2c4962c3ee65d7e92f'/>
<id>urn:sha1:664cdcc65cf42ab269ea4a2c4962c3ee65d7e92f</id>
<content type='text'>
These (non-css) cursor shapes were added to the cursor-shape-v1
protocol in wayland-protocols 1.42.

We don't need (or use them at all) internally, but add them to the
list we use to translate from shape names to shape enums. This allows
users to set a custom shape (via OSC-22), while still using server
side cursors (i.e. no need to fallback to client-side cursors).

If we try to set a shape not implemented by the server, we get a
protocol error and foot exits. This is bad.

So, make sure we don't do that:

1. First, we need to explicitly bind v2 if implemented by the server
2. Track the bound version number in the wayland struct
3. When matching shape enum, skip shapes not supported in the
   currently bound version of the cursor-shape protocol
</content>
</entry>
<entry>
<title>term: unittest: auto-scroll timer FD is created on-demand nowadays</title>
<updated>2025-05-08T08:22:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-08T08:22:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9b0d5e7c96f75d7ca81cd2e452cda54688ecc259'/>
<id>urn:sha1:9b0d5e7c96f75d7ca81cd2e452cda54688ecc259</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: refactor to allow setting only selection bg or fg</title>
<updated>2025-05-05T11:02:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-05T10:43:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=073b637d4535cd0dfe92ca1ce954b552ae9f1a4a'/>
<id>urn:sha1:073b637d4535cd0dfe92ca1ce954b552ae9f1a4a</id>
<content type='text'>
Before this, we only applied custom selection colors, if *both* the
selection bg and fg had been set.

Since the options are already split up into two separate options, and
since it makes sense to at least be able to keep the foreground colors
unchanged (i.e. only setting the selection background), let's allow
only having one of the selection colors set.

Closes #1846
</content>
</entry>
<entry>
<title>config: tweak.surface-bit-depth: add support for 16-bit surfaces</title>
<updated>2025-05-03T07:04:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-01T07:37:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=970e13db8deebf6c7542c7aede4f34703fa86769'/>
<id>urn:sha1:970e13db8deebf6c7542c7aede4f34703fa86769</id>
<content type='text'>
This adds supports for 16-bit surfaces, using the new
PIXMAN_a16b16g16r16 buffer format. This maps to
WL_SHM_FORMAT_ABGR16161616 (little-endian).

Use the new 16-bit surfaces by default, when
gamma-correct-blending=yes.
</content>
</entry>
<entry>
<title>config: tweak.surface-bit-depth now defaults to 'auto'</title>
<updated>2025-05-01T06:54:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-01T06:34:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e5a0755451b736c635be58764799ef8d7b536e8d'/>
<id>urn:sha1:e5a0755451b736c635be58764799ef8d7b536e8d</id>
<content type='text'>
When set to 'auto', use 10-bit surfaces if gamma-correct blending is
enabled, and 8-bit surfaces otherwise.

Note that we may still fallback to 8-bit surfaces (without disabling
gamma-correct blending) if the compositor does not support 10-bit
surfaces.

Closes #2082
</content>
</entry>
<entry>
<title>config: add initial-color-theme=1|2</title>
<updated>2025-04-26T12:43:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-21T10:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bc5b71666867c00e7dc850740bb5cc2a13a9c2a9'/>
<id>urn:sha1:bc5b71666867c00e7dc850740bb5cc2a13a9c2a9</id>
<content type='text'>
This option selects which color theme to use by default. I.e. at
startup, and after a reset.

This is useful with combined theme files, where a single file defines
e.g. both a dark and light version of the theme.
</content>
</entry>
<entry>
<title>key-bindings: add bindings to switch between color themes</title>
<updated>2025-04-26T12:20:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-20T05:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6bc91b5e288ef16613a4e6f9d0a9f6077cedc267'/>
<id>urn:sha1:6bc91b5e288ef16613a4e6f9d0a9f6077cedc267</id>
<content type='text'>
* color-theme-switch-1: select the primary color theme
* color-theme-switch-2: select the alternative color theme
* color-theme-toggle: toggle between the primary and alternative color themes
</content>
</entry>
</feed>
