<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/osc.c, branch 1.22.1</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.22.1</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.22.1'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-02-06T13:02:38Z</updated>
<entry>
<title>osc: text-size: disable optimization</title>
<updated>2025-02-06T13:02:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-03T14:30:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0f93766614bde055ce61e1b7ffc8f6b5aeef91d3'/>
<id>urn:sha1:0f93766614bde055ce61e1b7ffc8f6b5aeef91d3</id>
<content type='text'>
The optimization prevents the forced-width to be set on the new
combining character, causing issues when followed by more zero-width
codepoints.
</content>
</entry>
<entry>
<title>osc: text-sizing: implement w=0, plus optimize single-codepoint cases</title>
<updated>2025-02-06T06:45:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-26T06:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1260004330359619113aac3cb3ea1a7fe2fddb2b'/>
<id>urn:sha1:1260004330359619113aac3cb3ea1a7fe2fddb2b</id>
<content type='text'>
If there's a single codepoint in the text portion of the OSC sequence,
and its calculated width matches the forced width, print it directly
to the grid instead of emitting a combining character.

When w=0, we split up the text string "as we normally would". Since we
don't support any other text-sizing parameters, this means simply
printing each codepoint to the grid.
</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>osc: wip: kitty text size protocol</title>
<updated>2025-02-06T06:42:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-25T13:09:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7a8d2b5e012636def9545075e01cdf9a6f309355'/>
<id>urn:sha1:7a8d2b5e012636def9545075e01cdf9a6f309355</id>
<content type='text'>
This brings initial support for the new kitty text-sizing
protocol. Note hat only the width-parameter ('w') is supported. That
is, no font scaling, and no multi-line cells.

For now, only explicit widths are supported. That is, w=0 does not yet
work.

There are a couple of changes to the renderer, to handle e.g.

    OSC 66 ; w=6 ; foobar ST

There are two ways this can get rendered, depending on whether
grapheme shaping has been enabled. We either shape it, and get an
array of glyphs back that we render. Or, we rasterize each codepoint
ourselves, and render each resulting glyph.

The two cases ends up in two different renderer loops, that worked
somewhat different. In particular, the first case has probably never
been tested/used at all...

With this patch, both are changed, and now uses some heuristic to
differentiate between multi-cell text strings (like in the example
above), or single-cell combining characters. The difference is mainly
in which offset to use for the secondary glyphs.

In a multi-cell string, each glyph is mapped to its own cell, while in
the combining case, we try to map all glyphs to the same cell.
</content>
</entry>
<entry>
<title>osc: ignore 'OSC 176 ?' - report app ID</title>
<updated>2025-01-07T12:01:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-07T12:00:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=06a32d553e8d2613e3b4582199a317219f5cfc8b'/>
<id>urn:sha1:06a32d553e8d2613e3b4582199a317219f5cfc8b</id>
<content type='text'>
It's not widely used (don't know _any_ application that uses it), and
can be used to trick users to run unwanted commands.
</content>
</entry>
<entry>
<title>osc: disable debug logging</title>
<updated>2025-01-02T08:12:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-02T08:12:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9f5be55d1cdf2a25fa3bb47247420cc658e646f8'/>
<id>urn:sha1:9f5be55d1cdf2a25fa3bb47247420cc658e646f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: add option to disable OSC-52, partially or fully</title>
<updated>2024-12-22T06:16:12Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-12-21T05:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e38ec79be15fe355bf50670bc9066210ae0ed211'/>
<id>urn:sha1:e38ec79be15fe355bf50670bc9066210ae0ed211</id>
<content type='text'>
Closes #1867
</content>
</entry>
<entry>
<title>osc: 9: ignore ConEmu/Windows Terminal sequences</title>
<updated>2024-11-02T07:33:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-11-02T07:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f3e443ea4709f94d5a5865d567f5e3647c8cf870'/>
<id>urn:sha1:f3e443ea4709f94d5a5865d567f5e3647c8cf870</id>
<content type='text'>
OSC-9 sequences starting with "&lt;number&gt;;" are now ignored, as they are
ConEmu sequences, and not iTerm notifications.
</content>
</entry>
<entry>
<title>osc: notify: fix crash with no message</title>
<updated>2024-10-31T06:03:04Z</updated>
<author>
<name>Jack Wilsdon</name>
<email>jack@wilsdon.me</email>
</author>
<published>2024-10-28T17:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=689549bb1f85f2ff7e1710d527dc2ead4cb3bb5b'/>
<id>urn:sha1:689549bb1f85f2ff7e1710d527dc2ead4cb3bb5b</id>
<content type='text'>
Closes #1866
</content>
</entry>
<entry>
<title>osc: OSC-1 does not set the icon, it sets the icon _label_</title>
<updated>2024-09-13T07:04:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-13T06:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7984f08925e18e24e6b54ac4498d65fa26b2a4d6'/>
<id>urn:sha1:7984f08925e18e24e6b54ac4498d65fa26b2a4d6</id>
<content type='text'>
In fact, there appears there *is* no escape sequence to set the icon.

Keep most of the logic in place, but in practice, we'll always set the
icon to the app-id. That is, at startup, we set it to the configured
app-id (either from config, or the command line).

OSC-176, which sets the app-id, also updates the icon (to the app-id).
</content>
</entry>
<entry>
<title>toplevel-icon: implement OSC-1, CSI 20/21/22/23 t</title>
<updated>2024-09-13T07:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-10T16:53:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=97ec375c67cc7b071b0478b6c887057008dc469e'/>
<id>urn:sha1:97ec375c67cc7b071b0478b6c887057008dc469e</id>
<content type='text'>
* The toplevel icon is now set to the app-id, unless "overridden" by
  OSC-1 or OSC-0.
* Implemented OSC-1
* OSC-0 extended to also set the icon
* Implemented CSI 20 t - report window icon
* Implemented CSI 21 t - report window title
* Implemented CSI 22 ; 1 t - push window icon
* Implemented CS 23 ; 1 t - pop window icon
* Extended CSI 22/23 ; 0 t to also push/pop the icon
* Verify app-id set by OSC-176 is valid UTF-8
* Verify icon set by OSC-0/1 is valid UTF-8
</content>
</entry>
<entry>
<title>xsnprintf: various improvements related to xvsnprintf() and xsnprintf()</title>
<updated>2024-09-13T07:01:15Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-09-11T19:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d4a1283797b5a964d92e64c698d65f701a90e1cc'/>
<id>urn:sha1:d4a1283797b5a964d92e64c698d65f701a90e1cc</id>
<content type='text'>
Summary of changes:

* Make xvsnprintf() static
* restrict-qualify pointer arguments (as done by the libc equivalents)
* Make comments and spec references more thorough
* Remove pointless `n &lt;= INT_MAX` assertion (see comment)
* Use FATAL_ERROR() instead of xassert() (since the assertion is inside
  a shared util function but the caller is responsible for ensuring the
  condition holds true)
* Change some callers to use size_t instead of int for the return value
  (negative returns are impossible and all subsequent uses are size_t)

The updated comments and code were taken (and adapted) from:

https://gitlab.com/craigbarnes/dte/-/blob/49260bb154bca0434462a41c061e512540ec2e49/src/util/xsnprintf.c#L6-50

This work was entirely authored by me and I hereby license this
contribution under the MIT license (stated explicitly, so that
there's no ambiguity w.r.t. the original license).
</content>
</entry>
<entry>
<title>notifications: BEL and OSC-777 now focuses the window on notification activation</title>
<updated>2024-09-05T05:16:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-05T05:13:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c5bb1fb2ed33c06078bfec5fb2f487f6406254d0'/>
<id>urn:sha1:c5bb1fb2ed33c06078bfec5fb2f487f6406254d0</id>
<content type='text'>
Or put more propertly; if the notification daemon, and the
notification helper used by foot has been configured
properly (i.e. they both support XDG activation tokens), notifications
generated by BEL and OSC-777 will now raise/focus the window when the
default action of the notification is activated - typically by
clicking the notification.

Closes #1822
</content>
</entry>
<entry>
<title>osc: notify: fix bad check for invalid UTF-8</title>
<updated>2024-08-20T05:14:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-20T05:14:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7dd204fd319222c1e500b2c117b4ed62f9e642af'/>
<id>urn:sha1:7dd204fd319222c1e500b2c117b4ed62f9e642af</id>
<content type='text'>
mbsntoc32() returns (size_t)-1 on failure, not (char32_t)-1.
</content>
</entry>
<entry>
<title>osc: regression: fix OSC-111 handling of alpha changes</title>
<updated>2024-08-14T06:53:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-14T06:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2896c1898127256193d49c80a56ba7188fad0e33'/>
<id>urn:sha1:2896c1898127256193d49c80a56ba7188fad0e33</id>
<content type='text'>
When the background alpha changes from fully opaque, to transparent,
or vice versa, we need to do more than just repaint the affected
cells.

For example, we need to create new surfaces with the correct pixel
format.

OSC-11 (set background color) already does this, but the same alpha
checking logic was missing in OSC-111 (reset background color).

Fixes #1801
</content>
</entry>
<entry>
<title>osc: kitty: update 's' to the latest spec</title>
<updated>2024-08-09T06:25:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-09T06:25:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ee9c76ded00de9beac698d2bd4771e8c1d966c6a'/>
<id>urn:sha1:ee9c76ded00de9beac698d2bd4771e8c1d966c6a</id>
<content type='text'>
* The spec now defines a couple of "standard" names. Translate these
  to the freedesktop compliant names.
* The query response no longer contains 'xdg-names', but instead list
  the supported standard names.
</content>
</entry>
<entry>
<title>osc: kitty notifications: add support for XDG sound names</title>
<updated>2024-08-04T13:23:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-04T13:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=84d36606cbd3e35aae6a68e69101b22da60dbe99'/>
<id>urn:sha1:84d36606cbd3e35aae6a68e69101b22da60dbe99</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: kitty notifications: implement s=silent</title>
<updated>2024-08-04T12:20:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-04T12:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=63492624918cd23a5efdd9b8a8b4f057da66d961'/>
<id>urn:sha1:63492624918cd23a5efdd9b8a8b4f057da66d961</id>
<content type='text'>
This implements part of the new 's' (sound) parameter; the 'silent'
value. When s=silent, we set the ${muted} template argument to
"true". It is intended to set the 'suppress-sound' hint:

    notify-send --hint BOOLEAN:suppress-sound:${muted}
</content>
</entry>
<entry>
<title>Merge branch 'xstrjoin3'</title>
<updated>2024-08-03T09:42:37Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-08-03T09:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b27841e1b590f91c9de21bb694909211421e5f96'/>
<id>urn:sha1:b27841e1b590f91c9de21bb694909211421e5f96</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: kitty notifications: ignore invalid IDs</title>
<updated>2024-08-03T09:05:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-03T09:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6b72108ee220dd64a3ff5a43a6c84d99078da62e'/>
<id>urn:sha1:6b72108ee220dd64a3ff5a43a6c84d99078da62e</id>
<content type='text'>
Notification IDs must only use characters from [a-zA-Z0-9_-+.]

    Terminals **must** sanitize ids received from client programs
    before sending them back in responses, to mitigate input injection
    based attacks. That is, they must either reject ids containing
    characters not from the above set, or remove bad characters when
    reading ids sent to them.

Foot implements the first: reject IDs containing characters not from
the above set.
</content>
</entry>
</feed>
