<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.h, branch 1.10.3</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.3</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.3'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-12-08T17:06:02Z</updated>
<entry>
<title>kitty: initial support for “report alternate key”</title>
<updated>2021-12-08T17:06:02Z</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=010c4001d2f83aaf1f5c86455c8e5bd4ba708cc7'/>
<id>urn:sha1:010c4001d2f83aaf1f5c86455c8e5bd4ba708cc7</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-08T17:05:46Z</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=7a5386d883c8b7cb4f23c13da948bd57c1eb3bf4'/>
<id>urn:sha1:7a5386d883c8b7cb4f23c13da948bd57c1eb3bf4</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-08T17:05:33Z</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=4e34fb8fb7006a3d5d9d458e220fffef47c97de6'/>
<id>urn:sha1:4e34fb8fb7006a3d5d9d458e220fffef47c97de6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: kitty: add support for the “report event” mode (0b10)</title>
<updated>2021-12-08T17:03:42Z</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=30f60259cc13fd13d483b8e6cd36338324735eb9'/>
<id>urn:sha1:30f60259cc13fd13d483b8e6cd36338324735eb9</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>
<entry>
<title>term: only scale using DPI if *all* monitors have a scaling factor or one</title>
<updated>2021-09-24T20:07:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-09-19T09:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fb77637eb96a71de48b49e40fbe7dd71ec85bcbf'/>
<id>urn:sha1:fb77637eb96a71de48b49e40fbe7dd71ec85bcbf</id>
<content type='text'>
With dpi-aware=auto (the default), scale fonts using DPI *only*
if *all* available monitors have a scaling factor of one.

The idea is this: if a user, with multiple monitors, have enabled
scaling on *at least* one monitor, he/she has most likely done so to
match the size of his/hers other monitors.

For example, if the user has one monitor with a scaling factor of one,
and another one with a scaling factor of two, he/she expects things to
be twice as large on the second monitor.

If we (foot) scale using DPI on the first monitor, and using the
scaling factor on the second monitor, foot will *not* look twice as
big on the second monitor (this was the old behavior of
dpi-aware=auto).

Part of #714
</content>
</entry>
<entry>
<title>term: turn ‘box-drawings’ array into three dynamically allocated arrays</title>
<updated>2021-09-14T07:50:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-09-14T07:50:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=37b15adcd8306652ce21804cb6140d1361adc94f'/>
<id>urn:sha1:37b15adcd8306652ce21804cb6140d1361adc94f</id>
<content type='text'>
The box_drawings array is now quite large, and uses up ~4K
when *empty*.

This patch splits it up into three separate, dynamically allocated
arrays; one for the traditional box+line drawing and block elements
glyphs, one for braille, and one for the legacy computing symbols.

When we need to render a glyph, the *entire* array (that it belongs
to) is allocated.

I.e this is one step closer to a dynamic glyph cache (like the one
fcft uses), but doesn’t go all the way.

This is especially nice for people with
‘box-drawings-uses-font-glyphs=yes’; for them, the custom glyphs now
uses 3*8 bytes (for the three array pointers), instead of 4K.
</content>
</entry>
<entry>
<title>box-drawing: add braille characters</title>
<updated>2021-09-12T17:22:12Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-09-02T12:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b4c759e2de429c20bf07c9e16162d154152014d9'/>
<id>urn:sha1:b4c759e2de429c20bf07c9e16162d154152014d9</id>
<content type='text'>
Render braille ourselves, instead of using font glyphs. Decoding a
braille character is easy enough; there are 256 codepoints,
represented by an 8-bit integer (i.e. subtract the Unicode codepoint
offset, 0x2800, and you’re left with an integer in the range 0-255).

Each bit corresponds to a dot. The first 6 bits represent the upper 6
dots, while the two last bits represent the fourth (and last) row of
dots.

The hard part is sizing the dots and the spacing between them.

The aim is to have the spacing between the dots be the same size as
the dots themselves, and to have the margins on each side be half the
size of the dots.

In a perfectly sized cell, this means two braille characters next to
each other will be evenly spaced.

This is however almost never the case. The layout logic currently:

* Set dot size to either the width / 4, or height / 8, depending on
  which one is smallest.

* Horizontal spacing is initialized to the width / 4

* Vertical spacing is initialized to the height / 8

* Horizontal margins are initialized to the horizontal spacing / 2

* Vertical margins are initialized to the vertical spacing / 2.

Next, we calculate the number of “remaining” pixels. That is, if we
add the left margin, two dots and the spacing between, how many pixels
are left on the horizontal axis?

These pixels are distributed in the following order (we “stop” as soon
as we run out of pixels):

* If the dot size is 0 (happens for very small font sizes), increase
  it to 1.
* If the margins are 0, increase them to 1.
* If we have enough pixels (need at 2 horizontal and 4 vertical),
  increase the dot size.
* Increase spacing.
* Increase margins.

Closes #702
</content>
</entry>
<entry>
<title>sixel: avoid looking up color from palette for each sixel</title>
<updated>2021-09-05T09:08:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-09-05T09:08:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=47c32d5913044912f5e0974ab6554de1f2a62b3b'/>
<id>urn:sha1:47c32d5913044912f5e0974ab6554de1f2a62b3b</id>
<content type='text'>
Instead, do the palette lookup when we receive the DECGCI (i.e. when
the palette entry is selected), and store the actual color value in
our sixel struct.
</content>
</entry>
<entry>
<title>sixel: calculate default bg once, in init</title>
<updated>2021-09-05T08:27:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-09-05T08:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f9642e959725fc43ad7dac0e3c8be842d53aa903'/>
<id>urn:sha1:f9642e959725fc43ad7dac0e3c8be842d53aa903</id>
<content type='text'>
We have all information we need to calculate the default background
color in sixel_init():

* Whether the image have transparency or not
* The current ANSI background color
</content>
</entry>
<entry>
<title>selection: don’t require two cell attr bits for selection updating</title>
<updated>2021-08-16T17:15:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-13T15:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ae70596a5034f9fd6bbca6b42e4fe52c42c70d34'/>
<id>urn:sha1:ae70596a5034f9fd6bbca6b42e4fe52c42c70d34</id>
<content type='text'>
When updating the selection (i.e when changing it - adding or removing
cells to the selection), we need to do two things:

* Unset the ‘selected’ bit on all cells that are no longer selected.
* Set the ‘selected’ bit on all cells that *are* selected.

Since it’s quite tricky to calculate the difference between the “old”
and “new” selection, this is done by first un-selecting the old
selection, and then selecting the new, updated selection. I.e. first
we clear the ‘selected’ bit from *all* cells, and then we re-set it on
those cells that are still selected.

This process also dirties the cells, to make sure they are
re-rendered (needed to reflect their new selected/un-selected status).

To avoid dirtying *all* previously selected, and newly selected cells,
we have used an algorithm that first runs a “pre-pass”, marking all
cells that *will* be selected as such. The un-select pass would then
skip (no dirty) cells that have been marked by the pre-pass. Finally,
the select pass would only dirty cells that have *not* been marked by
the pre-pass.

In short, we only dirty cells whose selection state have *changed*.

To do this, we used a second ‘selected’ bit in the cell attribute
struct.

Those bits are *scarce*.

This patch implements an alternative algorithm, that frees up one of
the two ‘selected’ bits.

This is done by lazy allocating a bitmask for the entire grid. The
pre-pass sets bits in the bitmask. Thus, after the pre-pass, the
bitmask has set bits for all cells that *will* be selected.

The un-select pass simply skips cells with a one-bit in the
bitmask. Cells without a one-bit in the bitmask are dirtied, and their
‘selected’ bit is cleared.

The select-pass doesn’t even have to look at the bitmask - if the cell
already has its ‘selected’ bit set, it does nothing. Otherwise it sets
it and dirties the cell.

The bitmask is implemented as an array of arrays of 64-bit
integers. Each outer element represents one row. These pointers are
calloc():ed before starting the pre-pass.

The pre-pass allocates the inner arrays on demand.

The unselect pass is designed to handle both the complete absence of a
bitmask, as well as row entries being NULL (both means the cell
is *not* pre-marked, and will thus be dirtied).
</content>
</entry>
</feed>
