<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.h, branch 1.17.1</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.17.1</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.17.1'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-04-05T17:34:17Z</updated>
<entry>
<title>term: send SIGHUP before SIGTERM when shutting down</title>
<updated>2024-04-05T17:34:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-04-05T14:27:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7f4328e0b1d5e47aa096c0d3cd8bfea143f80a91'/>
<id>urn:sha1:7f4328e0b1d5e47aa096c0d3cd8bfea143f80a91</id>
<content type='text'>
If we're the ones initiating shutdown, start by sending SIGHUP. Only
if the client application does not terminate, send SIGTERM (and if it
still refuses to terminate, send SIGKILL).

Also reduce the timeout between the signals from 60s to 30s.
</content>
</entry>
<entry>
<title>sixel: RA region does not affect the text cursor position</title>
<updated>2024-03-18T16:11:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-03-15T14:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cb820a498bc8b9c3823f54d0452c2e5d30de1996'/>
<id>urn:sha1:cb820a498bc8b9c3823f54d0452c2e5d30de1996</id>
<content type='text'>
The raster attributes is, really, just a way to erase an area. And, if
the sixel is transparent, it's a nop.

The final text cursor position depends, not on our image size (which
is based on RA), but on the final graphical cursor position.

However, we do want to continue using it as a hint of the final image
size, to be able to pre-allocate the backing buffer.

So, here's what we do:

* When trimming trailing transparent rows, only trim the *image*, if
  the graphical cursor is positioned on the last sixel row, *and* the
  sixel is transparent.
* Opaque sixels aren't trimmed at all, since RA in this acts as an
  erase that fills the RA region with the background color.
* The graphical cursor position is always adjusted (i.e. trimmed),
  since it affects the text cursor position.
* The text cursor position is now calculated from the graphical cursor
  position, instead of the image height.
</content>
</entry>
<entry>
<title>sixel: trim trailing, fully transparent sixel rows</title>
<updated>2024-03-18T16:09:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-03-11T15:25:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cc660bc7c1a55e71f8c7a131fbcf8753b447f977'/>
<id>urn:sha1:cc660bc7c1a55e71f8c7a131fbcf8753b447f977</id>
<content type='text'>
See https://github.com/hpjansson/chafa/issues/192
</content>
</entry>
<entry>
<title>Add support for opening an existing PTY</title>
<updated>2024-03-14T06:31:03Z</updated>
<author>
<name>Alyssa Ross</name>
<email>hi@alyssa.is</email>
</author>
<published>2021-12-10T17:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=86894a1cd29f8fb3e5a8487b4ce2d2c1b4cf57a9'/>
<id>urn:sha1:86894a1cd29f8fb3e5a8487b4ce2d2c1b4cf57a9</id>
<content type='text'>
Virtual machine monitor programs (e.g. QEMU, Cloud Hypervisor) expose
guest consoles as PTYs.  With this patch, foot can access these guest
consoles.

Usually, the program used for accessing these PTYs is screen, but
screen is barely developed, doesn't support resizing, and has a bunch
of other unrelated stuff going on.  It would be nice to have a
terminal emulator that properly supported opening an existing PTY.
The VMM controls the master end of the PTY, so to the other end (in
this case foot), it just behaves like any application running in a
directly-opened PTY, and all that's needed is to change foot's code to
support opening an existing PTY rather than creating one.

Co-authored-by: tanto &lt;tanto@ccc.ac&gt;
</content>
</entry>
<entry>
<title>term_fill(): change ‘character’ parameter from char -&gt; uint8_t</title>
<updated>2024-03-07T15:24:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T15:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=23908d9277b3c41c294102993875cf485db689cb'/>
<id>urn:sha1:23908d9277b3c41c294102993875cf485db689cb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: modify term_fill() to optionally reset the SGR attributes</title>
<updated>2024-03-07T15:24:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T15:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b3a84ba71b021b484e0ddc023480eb6d9f885991'/>
<id>urn:sha1:b3a84ba71b021b484e0ddc023480eb6d9f885991</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: replace term_put_char() with term_fill()</title>
<updated>2024-03-07T15:24:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T14:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=189cfd717fd4670a97995ad9b8e08a2352c09099'/>
<id>urn:sha1:189cfd717fd4670a97995ad9b8e08a2352c09099</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: add term_put_char()</title>
<updated>2024-03-07T15:24:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-26T13:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ea851962c1f4f1d30e350de3f4aa7bfbea135dcf'/>
<id>urn:sha1:ea851962c1f4f1d30e350de3f4aa7bfbea135dcf</id>
<content type='text'>
This function prints a single, non-double width, character to the
grid. It handles OSC-8 hyperlinks, but does not:

* update the cursor location
* erase sixels
</content>
</entry>
<entry>
<title>sixel: performance improvements</title>
<updated>2024-03-06T15:37:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-03-04T15:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1568518ab3c30ce9d83d6e2c4a9d8e74bbe15051'/>
<id>urn:sha1:1568518ab3c30ce9d83d6e2c4a9d8e74bbe15051</id>
<content type='text'>
* Store pointer to current pixel (i.e. pixel we're about to write to),
  instead of a row-byte-offset. This way, we don't have to calculate the
  offset into the backing image every time we emit a sixel band.

* Pass data pointer directly to sixel_add_*(), to avoid having to
  calculate an offset into the backing image.

* Special case adding a single 1:1 sixel. This removes a for loop, and
  simplifies state (position) updates. It is likely LTO does this for
  us, but this way, we get it optimized in non-LTO builds as well.
</content>
</entry>
<entry>
<title>osc: add support for osc 176 (app ID)</title>
<updated>2024-02-06T12:50:09Z</updated>
<author>
<name>delthas</name>
<email>delthas@dille.cc</email>
</author>
<published>2023-09-04T12:02:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6c56b04b3f312be8dcee307e29515f3c83b3ae87'/>
<id>urn:sha1:6c56b04b3f312be8dcee307e29515f3c83b3ae87</id>
<content type='text'>
This adds support for a new OSC escape sequence: OSC 176, that lets
terminal programs tell the terminal the name of the app that is
running. foot then sets the app ID of the toplevel to that ID,
which lets the compositor know which app is running, and typically
sets the appropriate icon, window grouping, ...

See: https://gist.github.com/delthas/d451e2cc1573bb2364839849c7117239
</content>
</entry>
<entry>
<title>term: drop term-&gt;render.title.is_armed</title>
<updated>2024-02-06T12:41:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T12:41:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4801d3a305e80b449f041d469432780d7b0cc179'/>
<id>urn:sha1:4801d3a305e80b449f041d469432780d7b0cc179</id>
<content type='text'>
This boolean isn't needed. The idea was probably to not re-program the
timer unnecessarily, or even to prevent it from being moved forward in
time indefinitely.

However, the logic has (probably) gone through some changes, that now
makes it irrelevant.

The timer isn't moved forward indefinitely; it is always set to 8ms
from the last title update. The closer we get to that point in time,
the smaller the timeout we set.

Now, is_armed _did_ prevent the timer from being re-programmed. But
that tiny performance tweak isn't really necessary, as the title
should, in normal cases, not be set that often anyway.
</content>
</entry>
<entry>
<title>Don't use fancy Unicode quotes, stick to ASCII</title>
<updated>2024-02-06T11:36:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T11:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7999975016a57cc0a2c2e20bc55f29de32df7044'/>
<id>urn:sha1:7999975016a57cc0a2c2e20bc55f29de32df7044</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: add pipe-command-output key-binding</title>
<updated>2024-02-06T11:12:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-08T10:45:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1c70a84fde80405e0b6658722af8bc3fb54f225d'/>
<id>urn:sha1:1c70a84fde80405e0b6658722af8bc3fb54f225d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: store column of FTCS_COMMAND_{EXECUTED,FINISHED} in row struct</title>
<updated>2024-02-06T11:12:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-08T09:46:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e9607de5ae2eaf1a57924bb282a660150eca6eb5'/>
<id>urn:sha1:e9607de5ae2eaf1a57924bb282a660150eca6eb5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: move row-&gt;prompt_marker into new struct, row-&gt;shell_integration</title>
<updated>2024-02-06T11:12:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-08T09:35:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f8e875a7cddaac91818b98993d17a96d09a5b4a5'/>
<id>urn:sha1:f8e875a7cddaac91818b98993d17a96d09a5b4a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: use wl_compositor version 6 when available</title>
<updated>2024-01-24T19:00:18Z</updated>
<author>
<name>Leonardo Hernández Hernández</name>
<email>leohdz172@proton.me</email>
</author>
<published>2024-01-10T04:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7e3da3007bb2459900d2c88d3ec11aecd1956849'/>
<id>urn:sha1:7e3da3007bb2459900d2c88d3ec11aecd1956849</id>
<content type='text'>
</content>
</entry>
<entry>
<title>slave: don't skip setting environment variables when using a custom environment</title>
<updated>2024-01-11T15:37:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-01-09T15:50:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9da7152f834384a354710fcc8f99a6f83e5dfc12'/>
<id>urn:sha1:9da7152f834384a354710fcc8f99a6f83e5dfc12</id>
<content type='text'>
When launching footclient with -E,--client-environment the environment
variables that should be set by foot, wasn't.

Those variables are:

* TERM
* COLORTERM
* PWD
* SHELL

and all variables defined by the user in the [environment] section in
foot.ini.

In the same way, we did not *unset* TERM_PROGRAM and
TERM_PROGRAM_VERSION.

This patch fixes it by "cloning" the custom environment, making it
mutable, and then adding/removing the variables above from it.

Instead of calling setenv()/unsetenv() directly, we add the wrapper
functions add_to_env() and del_from_env().

When *not* using a custom environment, they simply call
setenv()/unsetenv().

When we *are* using a custom environment, add_to_env() first loops all
existing variables, looking for a match. If a match is found, it's
updated with the new value. If it's not found, a new entry is added.

del_from_env() loops all entries, and removes it when a match is
found. If no match is found, nothing is done.

The mutable environment is allocated on the heap, but never free:d. We
don't need to free it, since it's only allocated after forking, in the
child process.

Closes #1568
</content>
</entry>
<entry>
<title>term: cache font baseline</title>
<updated>2023-10-10T12:23:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-10-10T12:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4449177517c2d96857483acbc8afd7438fcdfadd'/>
<id>urn:sha1:4449177517c2d96857483acbc8afd7438fcdfadd</id>
<content type='text'>
No need to redo the calculation for every single cell we render,
every frame...
</content>
</entry>
<entry>
<title>csi: implement DECSET/DECRST/DECRQM 2027 - grapheme cluster processing</title>
<updated>2023-09-25T14:50:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-09-20T11:45:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4eef001d5855b9b5afb59bbd3b92b3a2828fcca0'/>
<id>urn:sha1:4eef001d5855b9b5afb59bbd3b92b3a2828fcca0</id>
<content type='text'>
This implements private mode 2027 - grapheme cluster processing, as
defined in the "Terminal Unicode Core"[1] specification.

Internally, we just flip the already existing option "grapheme
shaping". Since it's now runtime changeable, we need a copy of it in
the terminal struct, rather than referencing the conf object.

[1]: https://github.com/contour-terminal/terminal-unicode-core/blob/13fc5a8993a033ff10c1f3433d08cb618cde4ac2/spec/terminal-unicode-core.tex#L50-L53
</content>
</entry>
<entry>
<title>selection: add support for selecting the contents of a quote</title>
<updated>2023-09-19T14:23:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-09-19T14:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1719ff93a75ad886ed53be468f7faa12f530e9f3'/>
<id>urn:sha1:1719ff93a75ad886ed53be468f7faa12f530e9f3</id>
<content type='text'>
This patch changes the default of triple clicking, from selecting the
current logical row, to first trying to select the contents of the
quote under the cursor, and if failing to find a quote, selecting the
current row (like before).

This is implemented by adding a new key binding, 'select-quote'.

It will search for surrounding quote characters, and if one is found
on each side of the cursor, the quote is selected. If not, the entire
row is selected instead.

Subsequent selection operations will behave as if the selection is
either a word selection (a quote was found), or a row selection (no
quote found).

Escaped quote characters are not supported: "foo \" bar" will match
'foo \', and not 'foo " bar'.

Mismatched quotes are not custom handled. They will simply not match.

Nested quotes ("123 'abc def' 456") are supported.

Closes #1364
</content>
</entry>
</feed>
