<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.h, branch 1.11.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.11.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.11.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2022-02-05T16:00:54Z</updated>
<entry>
<title>fcft: adapt to API changes in fcft-3.x</title>
<updated>2022-02-05T16:00:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-21T12:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e0227266cabc015c282774ac898e3f52dce943df'/>
<id>urn:sha1:e0227266cabc015c282774ac898e3f52dce943df</id>
<content type='text'>
Fcft no longer uses wchar_t, but plain uint32_t to represent
codepoints.

Since we do a fair amount of string operations in foot, it still makes
sense to use something that actually _is_ a string (or character),
rather than an array of uint32_t.

For this reason, we switch out all wchar_t usage in foot to
char32_t. We also verify, at compile-time, that char32_t used
UTF-32 (which is what fcft expects).

Unfortunately, there are no string functions for char32_t. To avoid
having to re-implement all wcs*() functions, we add a small wrapper
layer of c32*() functions.

These wrapper functions take char32_t arguments, but then simply call
the corresponding wcs*() function.

For this to work, wcs*() must _also_ be UTF-32 compatible. We can
check for the presence of the  __STDC_ISO_10646__ macro. If set,
wchar_t is at least 4 bytes and its internal representation is UTF-32.

FreeBSD does *not* define this macro, because its internal wchar_t
representation depends on the current locale. It _does_ use UTF-32
_if_ the current locale is UTF-8.

Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is
defined.

Other fcft API changes:

* fcft_glyph_rasterize() -&gt; fcft_codepoint_rasterize()
* font.space_advance has been removed
* ‘tags’ have been removed from fcft_grapheme_rasterize()
* ‘fcft_log_init()’ removed
* ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
</content>
</entry>
<entry>
<title>search: remember last searched-for string between searches</title>
<updated>2022-01-29T16:50:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-01-27T17:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=739e7d76b4b70da91c50a53026a83d382dd73bae'/>
<id>urn:sha1:739e7d76b4b70da91c50a53026a83d382dd73bae</id>
<content type='text'>
Regardless of how we exit search mode (commit or cancel), the search
string is remembered.

The next time we enter search mode, the last searched-for string will
be used when searching for the next/prev match (ctrl+r, ctrl+s), and
the search query is empty.
</content>
</entry>
<entry>
<title>replace gettimeofday with clock_gettime</title>
<updated>2022-01-15T16:05:45Z</updated>
<author>
<name>Pranjal Kole</name>
<email>pranjal.kole7@gmail.com</email>
</author>
<published>2022-01-15T09:26:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0da19a81bc9a94f83bfcf8c5af0e3571f751cf38'/>
<id>urn:sha1:0da19a81bc9a94f83bfcf8c5af0e3571f751cf38</id>
<content type='text'>
POSIX.1-2008 has marked gettimeofday(2) as obsolete, recommending the
use of clock_gettime(2) instead.

CLOCK_MONOTONIC has been used instead of CLOCK_REALTIME because it is
unaffected by manual changes in the system clock. This makes it better
for our purposes, namely, measuring the difference between two points in
time.

tv_sec has been casted to long in most places since POSIX does not
define the actual type of time_t.
</content>
</entry>
<entry>
<title>SGR-Pixels mouse mode, closes #762</title>
<updated>2022-01-01T10:02:30Z</updated>
<author>
<name>Autumn Lamonte</name>
<email>AutumnWalksTheLake@gmail.com</email>
</author>
<published>2021-12-30T11:13:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d72ba4a062b52a8efed09c0160a985345b9f722f'/>
<id>urn:sha1:d72ba4a062b52a8efed09c0160a985345b9f722f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term_mouse_grabbed(): make ‘seat’ argument const</title>
<updated>2021-12-28T16:10:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-24T14:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a835436537098966c817d0d7aafbf01ed43589fa'/>
<id>urn:sha1:a835436537098966c817d0d7aafbf01ed43589fa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term_erase(): replace coord-typed arguments with regular ints</title>
<updated>2021-12-26T11:39:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-25T18:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=39bb6be8bfb3700947b21cbd3d466de755368b9b'/>
<id>urn:sha1:39bb6be8bfb3700947b21cbd3d466de755368b9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kitty: initial support for “report alternate key”</title>
<updated>2021-12-08T16:54:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-07T18:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9d5ab91b6af513efaeb08e9bf747897641f2a809'/>
<id>urn:sha1:9d5ab91b6af513efaeb08e9bf747897641f2a809</id>
<content type='text'>
In this mode, the “shifted” and “base layout” keys are added to the
CSIs, as sub-parameters to the “key” parameter.

Note that this PR only implements the “shifted” key, not the “base
layout key”.

This is done by converting the original XKB symbol to it’s
corresponding UTF-32 codepoint. If this codepoint is different from
the one we use as “key” in the CSI, we add it as a sub-parameter.

Related to #319
</content>
</entry>
<entry>
<title>kitty: implement “report associated text”</title>
<updated>2021-12-08T16:53:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-06T22:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=78666d248a6b5a40effd2a30cb9483cd8141bb1e'/>
<id>urn:sha1:78666d248a6b5a40effd2a30cb9483cd8141bb1e</id>
<content type='text'>
In this mode, key events that generate text now add a third CSI
parameter, indicating the actual codepoint.

Remember that we always use the *unshifted* key in the CSI
escapes. With this mode, those CSI escapes now also included the text
codepoint. I.e. what would have been emitted, had we not generated a
CSI escape.

As far as I can tell, this mode has no effect unless “report all keys
as escape sequences” is enabled (reason being, without that, there
aren’t any text events that generate CSIs - they’re always emitted
as-is).

Note that Kitty itself seems to be somewhat buggy in this mode. At
least on Wayland, with my Swedish layout. For example ‘a’ and ‘A’ does
generate the expected CSIs, but ‘å’ and ‘Å’ appears to be treated as
non-text input.

Furthermore, Kitty optimizes away the modifier parameter, if no
modifiers are pressed (e.g. CSI 97;;97u), while we always emit the
modifier (CSI 97;1;97u).

Related to #319
</content>
</entry>
<entry>
<title>input: kitty: add support for “report all keys as escape codes”</title>
<updated>2021-12-06T18:49:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-29T20:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0e2d8429c03e29c91dd23419d2c5cc9982af13b7'/>
<id>urn:sha1:0e2d8429c03e29c91dd23419d2c5cc9982af13b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: kitty: add support for the “report event” mode (0b10)</title>
<updated>2021-12-04T17:32:06Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-28T17:45:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1df94f1468d0cdffea4cfcc68783aee4239261f9'/>
<id>urn:sha1:1df94f1468d0cdffea4cfcc68783aee4239261f9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: rename: KITTY_KBD_MASK -&gt; KITTY_KBD_SUPPORTED</title>
<updated>2021-11-28T14:14:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-22T21:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8f38cd486f73db1bb2239acf0ab8382786a21752'/>
<id>urn:sha1:8f38cd486f73db1bb2239acf0ab8382786a21752</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: kitty kbd: fix typo: ‘BKD’ -&gt; ‘KBD’</title>
<updated>2021-11-28T14:14:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-16T18:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3c01eb48dc1b54b8939b6afa628361523a9def3e'/>
<id>urn:sha1:3c01eb48dc1b54b8939b6afa628361523a9def3e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kitty kbd: add flag state, implement push/pop/update/query</title>
<updated>2021-11-28T14:14:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-16T15:32:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fec42e5941c20f4b69164dd0d78ea7e7e0f17de5'/>
<id>urn:sha1:fec42e5941c20f4b69164dd0d78ea7e7e0f17de5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc8: uri ranges: use a dynamically re-sizable array instead of a tllist</title>
<updated>2021-11-26T19:09:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-26T18:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ccee08a393f4c55994e921b43a16f5942816d764'/>
<id>urn:sha1:ccee08a393f4c55994e921b43a16f5942816d764</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc8: update URI ranges as we print data, *not* when the URI is closed</title>
<updated>2021-11-25T18:31:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-25T18:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8c50a7afd401686f645fb26676fbcaedb8d4ab62'/>
<id>urn:sha1:8c50a7afd401686f645fb26676fbcaedb8d4ab62</id>
<content type='text'>
At first, an OSC-8 URI range was added when we received the closing
OSC-8 escape (i.e. with an empty URI).

But, this meant that cursor movements while the OSC-8 escape was in
effect wasn’t handled correctly, since we’d add a range that spanned
the cursor movements.

Attempts were made to handle this in the cursor movement functions, by
closing and re-opening the URI.

However, there are too many corner cases to make this a viable
approach. Scrolling is one such example, line-wrapping another.

This patch takes a different approach; emit, or update the URI range
when we print to the grid. This models the intended behavior much more
closely, where an active OSC-8 URI act like any other SGR attribute -
it is applied to all cells printed to, but otherwise have no effect.

To avoid killing performance, this is only done in the “generic”
printer. This means OSC-8 open/close calls must now “switch” the ASCII
printer.

Note that the “fast” printer still needs to *erase* pre-existing OSC-8
URIs.

Closes #816
</content>
</entry>
<entry>
<title>term: track cell color source</title>
<updated>2021-11-20T15:46:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-20T15:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d46af6bd7ac7606bf99d63b2453b656a5defb892'/>
<id>urn:sha1:d46af6bd7ac7606bf99d63b2453b656a5defb892</id>
<content type='text'>
Each cell now tracks it’s current color source:

* default fg/bg
* base16 fg/bg (maps to *both* the regular and bright colors)
* base256 fg/bg
* RGB

Note that we don’t have enough bits to separate the regular from the
bright colors. These _shouldn’t_ be the same, so we ought to be
fine...
</content>
</entry>
<entry>
<title>input: add support for modifyOtherKeys=2</title>
<updated>2021-11-13T10:09:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-11T16:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4a740509996d3a7e8808593d1cbc0128b1ae03ed'/>
<id>urn:sha1:4a740509996d3a7e8808593d1cbc0128b1ae03ed</id>
<content type='text'>
Similar to modifyOtherKeys=1 (foot’s default, and only, mode), except
that:

* All modifiers (and not just Ctrl) generate \E[27;m;n~ escapes
* Regular keys (with modifiers) also generate \E[27;m;n~ escapes (for
  example, C-h no longer generates ^H, but \E[27;5;104~)

For our keymap based lookups, this is handled by adding
MOD_MODIFY_OTHER_KEYS_STATE&lt;N&gt; variants.

For “generic” keys, we simply adjust the conditions for when to emit a
\E[27;m;n~ escape - the only requirement is that at least one modifier
is active.
</content>
</entry>
<entry>
<title>config: add {str,value}_to_uint{16,32}()</title>
<updated>2021-11-13T10:04:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-06T11:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d29c3cf7b76c6a1935684124b4d7cad69de94c78'/>
<id>urn:sha1:d29c3cf7b76c6a1935684124b4d7cad69de94c78</id>
<content type='text'>
This allows us to pass the final pointer directly to the conversion
functions, as well as allowing us to print outside-range errors.
</content>
</entry>
<entry>
<title>foot/client: implement xdga client activation</title>
<updated>2021-11-01T01:52:29Z</updated>
<author>
<name>Ronan Pigott</name>
<email>rpigott@berkeley.edu</email>
</author>
<published>2021-10-29T00:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8'/>
<id>urn:sha1:99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8</id>
<content type='text'>
This is an application of the xdg activation protocol that will allow
compositors to associate new foot toplevels with the command that
launched them.

footclient receives an activation token from the launcher which the
compositor can use to track application startup. It passes the token
to the foot server, which then activates the new window with the token
to complete the startup sequence.
</content>
</entry>
<entry>
<title>osc: use BEL terminator in OSC replies to BEL-terminated OSC queries</title>
<updated>2021-10-20T11:48:37Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-10-20T11:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=52dcf72d0b80b9f4c159744447b34d215a38d24c'/>
<id>urn:sha1:52dcf72d0b80b9f4c159744447b34d215a38d24c</id>
<content type='text'>
This matches the documented (and observed) behavior in xterm:

&gt; XTerm accepts either BEL or ST for terminating OSC sequences, and
&gt; when returning information, uses the same terminator used in a query

-- https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
</content>
</entry>
</feed>
