<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.h, branch spawn-terminal-cmdline-arguments</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=spawn-terminal-cmdline-arguments</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=spawn-terminal-cmdline-arguments'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2026-11-12T11:01:00Z</updated>
<entry>
<title>spawn-terminal: spawn with all the original command line options</title>
<updated>2026-11-12T11:01:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-11-12T10:50:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f51f18d33557ea9078f7781f4a4235706228f5c9'/>
<id>urn:sha1:f51f18d33557ea9078f7781f4a4235706228f5c9</id>
<content type='text'>
Before this, spawn-terminal would spawn a new foot or footclient,
but *without* any of the command line options the user started the
original foot/footclient with.

We did have a hack for --config, but all other options were forgotten
in the new instance.

This patch fixes this.

* term_init() stores the raw argc/argv in the terminal struct.
* term_spawn_new() calls spawn() with the stored argc/argv.
* for single instances, main() calls term_init() with the unparsed
  argc/argv.
* the client/server protocol is extended to always send the raw
  argc/argv to the server.
* the server calls term_init() with the argc/argv from the client.
* bonus: on linux, we now use /proc/self/exe to determine which binary
  to launch. This means if you run e.g. a foot from your build tree,
  spawn-terminal will exec _that_ foot, not the system foot.

A couple of behavioral changes, and/or side-effects, caused by the
above (not exhaustive):

* footclient -E: spawn-terminal will not use the _exact_ environment
  from the original footclient, but will simply pass -E to the new
  footclient. This means the new instance will inherit the *current*
  environment of the original instance.
* foot htop: spawn-instance will _also_ launch a new foot+htop. Before
  this patch, spawn-instance would launch a new foot+shell.

Closes #1622
</content>
</entry>
<entry>
<title>term: wrap url related fields into a struct</title>
<updated>2026-09-02T07:18:21Z</updated>
<author>
<name>K4</name>
<email>k4@noreply.codeberg.org</email>
</author>
<published>2026-08-25T12:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=de649b6137ec1c5f7f684ef44e48d9a881a2744f'/>
<id>urn:sha1:de649b6137ec1c5f7f684ef44e48d9a881a2744f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>terminal: keep saved SGR attributes per-grid</title>
<updated>2026-08-15T05:20:50Z</updated>
<author>
<name>aloires</name>
<email>aloires@tutamail.com</email>
</author>
<published>2026-08-14T21:04:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4eaae1cb826f5338e992579991f41fd71f99fb92'/>
<id>urn:sha1:4eaae1cb826f5338e992579991f41fd71f99fb92</id>
<content type='text'>
DECSC/DECRC (ESC7/ESC8), CSI s/u and DECSET/DECRST 1048/1049 all
save/restore the SGR attributes through the same, global saved_attrs
slot.

An application emitting ESC7/ESC8 in the alternate screen to wrap
sixel rendering in a save/restore-cursor pair overwrites the slot
with its own SGR state. DECRST 1049 then restores those attributes,
instead of the ones saved by DECSET 1049. The shell prompt is left
with the application's attributes, even though the application reset
them (sgr0) before exiting.
</content>
</entry>
<entry>
<title>terminal: add visibility reports</title>
<updated>2026-07-30T12:18:58Z</updated>
<author>
<name>Tim Culverhouse</name>
<email>tim@timculverhouse.com</email>
</author>
<published>2026-07-28T19:16:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8db88cceb758b5be23e7db1fe74a48102ab07dc0'/>
<id>urn:sha1:8db88cceb758b5be23e7db1fe74a48102ab07dc0</id>
<content type='text'>
Applications cannot infer whether their terminal view is observable from
keyboard focus alone, so they may continue expensive rendering while the
surface is hidden.

Implement private mode 2033 and the one-shot visibility query. Report
Wayland xdg_toplevel suspension as not visible and otherwise remain
conservative by treating the terminal as potentially visible.

Amp-Thread-ID: https://ampcode.com/threads/T-019fb2b7-f245-7124-a69a-1484812532bb
Co-authored-by: Amp &lt;amp@ampcode.com&gt;
</content>
</entry>
<entry>
<title>term: do not allow codepoint merging into grapheme clusters directly after a cursor move</title>
<updated>2026-06-12T13:54:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-06-12T13:34:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d7742d031276a19160dc9317ff6fb5aac861d853'/>
<id>urn:sha1:d7742d031276a19160dc9317ff6fb5aac861d853</id>
<content type='text'>
That is, only do grapheme clustering when printing codepoints in
sequence, without any cursor movements in between.

Closes #2383
</content>
</entry>
<entry>
<title>config: add url.style=none|single|double|curly|dotted|dashed</title>
<updated>2026-04-06T13:47:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-04-06T13:47:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2c454a71f14da912f5623336b93ec8f48f2d1cf9'/>
<id>urn:sha1:2c454a71f14da912f5623336b93ec8f48f2d1cf9</id>
<content type='text'>
This option allows you to configure which underline style to use with
URLs.

The default is dotted. Since before this patch, URL underlines were
always plain underlines, this means the default URL underline style
has changed, from single to dotted.

Closes #2302
</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>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>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+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>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: 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>csi: implement private mode 2031 (dark/light mode detection)</title>
<updated>2025-04-26T12:23:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-20T10:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=10e7f291498a6600cfecc3cde604ea51de5f0f5a'/>
<id>urn:sha1:10e7f291498a6600cfecc3cde604ea51de5f0f5a</id>
<content type='text'>
* Recognize 'CSI ? 996 n', and respond with
  - 'CSI ? 997 ; 1 n' if the primary theme is active
  - 'CSI ? 997 ; 2 n' if the alternative theme is actice
* Implement private mode 2031, where changing the color
  theme (currently only possible via key bindings) causes the terminal
  to send the same CSI sequences as above.

In this context, foot's primary theme is considered dark, and the
alternative theme light (since the default theme is dark).

Closes #2025
</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>
<entry>
<title>render: gamma-correct blending</title>
<updated>2025-03-05T17:45:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-21T10:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ccf625b9914917e131beb83379c526bab1927edc'/>
<id>urn:sha1:ccf625b9914917e131beb83379c526bab1927edc</id>
<content type='text'>
This implements gamma-correct blending, which mainly affects font
rendering.

The implementation requires compile-time availability of the new
color-management protocol (available in wayland-protocols &gt;= 1.41),
and run-time support for the same in the compositor (specifically, the
EXT_LINEAR TF function and sRGB primaries).

How it works: all colors are decoded from sRGB to linear (using a
lookup table, generated in the exact same way pixman generates it's
internal conversion tables) before being used by pixman. The resulting
image buffer is thus in decoded/linear format. We use the
color-management protocol to inform the compositor of this, by tagging
the wayland surfaces with the 'ext_linear' image attribute.

Sixes: all colors are sRGB internally, and decoded to linear before
being used in any sixels. Thus, the image buffers will contain linear
colors. This is important, since otherwise there would be a
decode/encode penalty every time a sixel is blended to the grid.

Emojis: we require fcft &gt;= 3.2, which adds support for sRGB decoding
color glyphs. Meaning, the emoji pixman surfaces can be blended
directly to the grid, just like sixels.

Gamma-correct blending is enabled by default *when the compositor
supports it*. There's a new option to explicitly enable/disable it:
gamma-correct-blending=no|yes. If set to 'yes', and the compositor
does not implement the required color-management features, warning
logs are emitted.

There's a loss of precision when storing linear pixels in 8-bit
channels. For this reason, this patch also adds supports for 10-bit
surfaces. For now, this is disabled by default since such surfaces
only have 2 bits for alpha. It can be enabled with
tweak.surface-bit-depth=10-bit.

Perhaps, in the future, we can enable it by default if:

* gamma-correct blending is enabled
* the user has not enabled a transparent background
</content>
</entry>
<entry>
<title>terminal: add comment/link to cursor::lcf, to clarify its purpose</title>
<updated>2025-02-18T17:32:54Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2025-02-18T17:32:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=101bc28698177807e997951d046a12dd2c741848'/>
<id>urn:sha1:101bc28698177807e997951d046a12dd2c741848</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term+vt: refactor: move "utf8" char processing to term_process_and_print_non_ascii()</title>
<updated>2025-02-06T06:45:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-26T06:33:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d3f692990ef66f550bb3a0ade2e84107cfbeca47'/>
<id>urn:sha1:d3f692990ef66f550bb3a0ade2e84107cfbeca47</id>
<content type='text'>
This function "prints" any non-ascii character (i.e. any character
that ends up in the action_utf8_print() function in vt.c) to the
grid. This includes grapheme cluster processing etc.

action_utf8_print() now simply calls this function.

This allows us to re-use the same functionality from other
places (like the text-sizing protocol).
</content>
</entry>
<entry>
<title>term: insert-mode: handle combining characters correctly</title>
<updated>2025-02-06T06:37:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-06T06:31:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=88dcde3ed8b30c14a5d834d0e88f9b4a5f584939'/>
<id>urn:sha1:88dcde3ed8b30c14a5d834d0e88f9b4a5f584939</id>
<content type='text'>
When the client application emits combining characters, for example
multi-codepoint emojis, in insert-mode, we ended up pushing partial
graphemes to the right, for each codepoint, resulting in too many
cells (and with the wrong content) being inserted.

The fix is fairly simple; don't "insert" when appending characters to
an existing grapheme cluster.

This isn't something we can detect easily in print_insert() (it would
require us to do grapheme clustering again). Fortunately, we do have
the required information in action_utf8_print(). So, pass this
information as a boolean to term_print().

Closes #1947
</content>
</entry>
<entry>
<title>config+url: add support for user-defined regex patterns</title>
<updated>2025-02-05T12:35:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-03T07:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=051cd6ecfc8b98e1d80b399ebea40207fe040750'/>
<id>urn:sha1:051cd6ecfc8b98e1d80b399ebea40207fe040750</id>
<content type='text'>
Users can now define their own regex patterns, and use them via key
bindings:

    [regex:foo]
    regex=foo(bar)?
    launch=path-to-script-or-application {match}

    [key-bindings]
    regex-launch=[foo] Control+Shift+q
    regex-copy=[foo] Control+Mod1+Shift+q

That is, add a section called 'regex:', followed by an
identifier. Define a regex and a launcher command line.

Add a key-binding, regex-launch and/or regex-copy (similar to
show-urls-launch and show-urls-copy), and connect them to the regex
with the "[regex-name]" syntax (similar to how the pipe-* bindings
work).
</content>
</entry>
<entry>
<title>render: fix order we're checking custom codepoints</title>
<updated>2025-01-03T06:33:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-03T06:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f5c10a245229fe173d58ecdc71e4a917524eaf7b'/>
<id>urn:sha1:f5c10a245229fe173d58ecdc71e4a917524eaf7b</id>
<content type='text'>
Fixes a crash when trying to print a "Legacy Computing"
symbol (U+1FB00-U+1FB9B).

Closes #1901
</content>
</entry>
</feed>
