<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/base64.h, branch 1.21.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.21.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.21.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-07-23T09:29:05Z</updated>
<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>
