<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/base64.h, branch osc-5522</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=osc-5522</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=osc-5522'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2026-05-22T09:58:54Z</updated>
<entry>
<title>base64: add base64_encode_oneshot()</title>
<updated>2026-05-22T09:58:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-16T18:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4bc8a39d6c6390d4ebfee6a16e22750e52d3da6a'/>
<id>urn:sha1:4bc8a39d6c6390d4ebfee6a16e22750e52d3da6a</id>
<content type='text'>
Convenience function for base64_encode() + base64_encode_final().

Internally, we also add base64_encode_to_buffer()

This is an internal function that encodes a multiple-of-three long
input into a user allocated buffer.

base64_encode() and base64_encode_oneshot() uses the new function to
do the bulk of the encoding. This allows base64_encode_oneshot() to do
a single allocation.

This patch also adds unit tests for both base64_encode() and
base64_encode_oneshot() (but _not_ for base64_encode_final()).

Finally, the type of the 'data' parameter is changed to 'void*'.
</content>
</entry>
<entry>
<title>osc: kitty notifications: updated support for icons</title>
<updated>2024-07-23T09:29:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-23T09:29:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ccb184ae645cd92a6e3aba429ab88a94a09bbf8c'/>
<id>urn:sha1:ccb184ae645cd92a6e3aba429ab88a94a09bbf8c</id>
<content type='text'>
This implements the suggested protocol discussed in
https://github.com/kovidgoyal/kitty/issues/7657.

Icons are handled by loading a cache. Both in-band PNG data, and
symbolic names are allowed.

Applications use a graphical ID to reference the icon both when
loading the cache, and when showing a notification.

* 'g' is the graphical ID
* 'n' is optional, and assigns a symbolic name to the icon
* 'p=icon' - the payload is icon PNG data. It needs to be base64
  encoded, but this is *not* implied. I.e. the application *must* use
  e=1 explicitly.

To load an icon (in-band PNG data):

    printf '\e]99;g=123:p=icon;&lt;base64-encoded-png-data&gt;\e\\'

or (symbolic name)

    printf '\e]99;g=123:n=firefox:p=icon;\e\\'

Of course, we can combine the two, assigning *both* a symbolic
name, *and* PNG data:

    printf '\e]99;g=123:n=firefox:p=icon;&lt;base64-encoded-png&gt;\e\\'

Then, to use the icon in a notification:

    printf '\e]99;g=123;this is a notification\e\\'

Foot also allows a *symbolic* icon to be defined and used at the same
time:

    printf '\e]99;g=123:n=firefox;this is a notification\e\\'

This obviously won't work with PNG data, since it uses the payload
portion of the escape sequence.
</content>
</entry>
<entry>
<title>base64: implement encode()</title>
<updated>2019-07-19T12:19:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-19T12:19:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9c3ccc182ef2eca08657ff2dc5bf0551c4ba26f7'/>
<id>urn:sha1:9c3ccc182ef2eca08657ff2dc5bf0551c4ba26f7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>base64: initial base64 decode implementation</title>
<updated>2019-07-19T09:11:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-19T09:11:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bb8a733758f1ca3137d2aef2665a05aa5b3859eb'/>
<id>urn:sha1:bb8a733758f1ca3137d2aef2665a05aa5b3859eb</id>
<content type='text'>
</content>
</entry>
</feed>
