<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/config.c, branch 1.12.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.12.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.12.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2022-04-17T13:39:51Z</updated>
<entry>
<title>key-binding: new API, for handling sets of key bindings</title>
<updated>2022-04-17T13:39:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-17T13:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=90a2ca966f657e5fdd82997aad9663e9984f3cc9'/>
<id>urn:sha1:90a2ca966f657e5fdd82997aad9663e9984f3cc9</id>
<content type='text'>
Up until now, our Wayland seats have been tracking key bindings. This
makes sense, since the seat’s keymap determines how the key bindings
are resolved.

However, tying bindings to the seat/keymap alone isn’t enough, since
we also depend on the current configuration (i.e. user settings) when
resolving a key binding.

This means configurations that doesn’t match the wayland object’s
configuration, currently don’t resolve key bindings correctly. This
applies to footclients where the user has overridden key bindings on
the command line (e.g. --override key-bindings.foo=bar).

Thus, to correctly resolve key bindings, each set of key bindings must
be tied *both* to a seat/keymap, *and* a configuration.

This patch introduces a key-binding manager, with an API to
add/remove/lookup, and load/unload keymaps from sets of key bindings.

In the API, sets are tied to a seat and terminal instance, since this
makes the most sense (we need to instantiate, or incref a set whenever
a new terminal instance is created). Internally, the set is tied to a
seat and the terminal’s configuration.

Sets are *added* when a new seat is added, and when a new terminal
instance is created. Since there can only be one instance of each
seat, sets are always removed when a seat is removed.

Terminals on the other hand can re-use the same configuration (and
typically do). Thus, sets ref-count the configuration. In other words,
when instantiating a new terminal, we may not have to instantiate a
new set of key bindings, but can often be incref:ed instead.

Whenever the keymap changes on a seat, all key bindings sets
associated with that seat reloads (re-resolves) their key bindings.

Closes #931
</content>
</entry>
<entry>
<title>url-mode: add a key binding that enables “persistent” URL mode</title>
<updated>2022-04-17T09:24:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-03-22T18:07:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=501a9fbb5e1ec09c26cf61c464cf5b4ae6dba28a'/>
<id>urn:sha1:501a9fbb5e1ec09c26cf61c464cf5b4ae6dba28a</id>
<content type='text'>
This is an alternative to ‘show-urls-launch’, where we stay in URL
mode after activating an URL.

Closes #964
</content>
</entry>
<entry>
<title>config: add [csd].hide-when-maximized=yes|no</title>
<updated>2022-04-16T09:45:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-15T18:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fbcebd4f1c32f30bfedbad6a108acf6900ea955f'/>
<id>urn:sha1:fbcebd4f1c32f30bfedbad6a108acf6900ea955f</id>
<content type='text'>
When enabled, the CSD titlebar will be hidden when the window is
maximized.

Closes #1019
</content>
</entry>
<entry>
<title>fix some small typos</title>
<updated>2022-04-13T07:41:10Z</updated>
<author>
<name>Merlin Büge</name>
<email>merlin.buege@tuhh.de</email>
</author>
<published>2022-04-06T18:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5539eac5909a426d23789ccc7a12ce0e7b29f983'/>
<id>urn:sha1:5539eac5909a426d23789ccc7a12ce0e7b29f983</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: config_free(): pass conf struct by pointer, not by-value</title>
<updated>2022-04-12T13:21:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-12T11:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=99db7aa7cfe55c2485c31e9f0fefd459fc1c09f2'/>
<id>urn:sha1:99db7aa7cfe55c2485c31e9f0fefd459fc1c09f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: simplify lookup of foot.ini</title>
<updated>2022-04-12T13:21:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-12T08:45:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=06d7432af30852479a3cde8ed0bf557db058af41'/>
<id>urn:sha1:06d7432af30852479a3cde8ed0bf557db058af41</id>
<content type='text'>
The old, complex, way of using a dynamic list to hold each path
component made _some_ sense before, when we needed to support both
~/.config/foot.ini and ~/.config/foot/foot.ini.

But now, it just over complicates things.
</content>
</entry>
<entry>
<title>config: use fallback when XDG_CONFIG_{HOME,DIRS} is set, but empty</title>
<updated>2022-04-07T11:06:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-06T18:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c7dd30742ab412fc0194eebbc5e081527772fdaf'/>
<id>urn:sha1:c7dd30742ab412fc0194eebbc5e081527772fdaf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: fallback to /etc/xdg if XDG_CONFIG_DIRS is unset</title>
<updated>2022-04-07T11:06:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-06T16:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=20608c987b1668cb2b4e3cff7615577cd05c2075'/>
<id>urn:sha1:20608c987b1668cb2b4e3cff7615577cd05c2075</id>
<content type='text'>
Closes #1008
</content>
</entry>
<entry>
<title>config: add tweak option to allow disabling sixels</title>
<updated>2022-04-06T17:25:43Z</updated>
<author>
<name>jvoisin</name>
<email>julien.voisin@dustri.org</email>
</author>
<published>2022-02-27T15:29:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=58a1ffe72483ffb52d617d2985851781e82a45b8'/>
<id>urn:sha1:58a1ffe72483ffb52d617d2985851781e82a45b8</id>
<content type='text'>
Closes #950
</content>
</entry>
<entry>
<title>config/input: add scrollback-home|end key bindings (unbound by default)</title>
<updated>2022-02-23T18:03:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-23T18:03:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f869ca45467ce7d326deffcff7e270cbcc893d2c'/>
<id>urn:sha1:f869ca45467ce7d326deffcff7e270cbcc893d2c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: do key binding collision handling in overrides</title>
<updated>2022-02-16T22:02:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-08T20:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cff097197f0e002636f982c70278dedf057256e9'/>
<id>urn:sha1:cff097197f0e002636f982c70278dedf057256e9</id>
<content type='text'>
This ensures we detect, and handle, collisions also for key-bindings
specified as overrides.
</content>
</entry>
<entry>
<title>wip: map key combos to custom text strings (including escapes)</title>
<updated>2022-02-16T22:02:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-06T18:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=422d94fb46ad18e52f5385e416cd00cb7b4c2fc9'/>
<id>urn:sha1:422d94fb46ad18e52f5385e416cd00cb7b4c2fc9</id>
<content type='text'>
With this, it is now possible to map key combos to custom escapes. The
new bindings are defined in a new section, “text-bindings”, on the
form “string=key combo”.

The string can consist of printable characters, or \xNN style hex
digits:

  [text-bindings]
  abcd = Control+a
  \x1b[A = Control+b Control+c Control+d  # map ctrl+b/c/d to UP
</content>
</entry>
<entry>
<title>config: rename csd.color.close -&gt; quit</title>
<updated>2022-02-09T16:51:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-08T19:12:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=757768dbe5a61a5fbfc628ad554f26add0397e42'/>
<id>urn:sha1:757768dbe5a61a5fbfc628ad554f26add0397e42</id>
<content type='text'>
This fixes a compilation error on FreeBSD:

../../foot/render.c:2055:45: error: no member named 'epoll_shim_close' in 'struct config::(anonymous at ../../foot/config.h:254:9)'
        conf_color = &amp;term-&gt;conf-&gt;csd.color.close;
                      ~~~~~~~~~~~~~~~~~~~~~ ^

/usr/local/include/libepoll-shim/epoll-shim/detail/common.h:8:15:
note: expanded from macro 'close': #define close epoll_shim_close
</content>
</entry>
<entry>
<title>config: ‘pipe’ is now optional ‘aux’ data in the key-binding struct</title>
<updated>2022-02-09T16:51:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-08T18:35:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e5c5cd54788076973f08f6aadf0d2b2f954a0423'/>
<id>urn:sha1:e5c5cd54788076973f08f6aadf0d2b2f954a0423</id>
<content type='text'>
This allows us to add helper functions that e.g. compare bindings’ aux
data in a generic way.
</content>
</entry>
<entry>
<title>config: rename enum config_key_binding_type -&gt; key_binding_type</title>
<updated>2022-02-09T16:51:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-08T18:02:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9814d9620607f18c8ac7f99b2b87cdc7e100020d'/>
<id>urn:sha1:9814d9620607f18c8ac7f99b2b87cdc7e100020d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: font-&gt;name may be NULL</title>
<updated>2022-02-06T11:07:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-06T11:06:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b0e9ee2137c3a9c491e49322b7b02a1355e5e15f'/>
<id>urn:sha1:b0e9ee2137c3a9c491e49322b7b02a1355e5e15f</id>
<content type='text'>
If it is, fallback to the font pattern instead, like we used to do
before fcft-3.
</content>
</entry>
<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>config: s/of the form/on the form/</title>
<updated>2022-02-05T15:59:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-05T15:59:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=343f2c51a4cc44aa5ae3a813ae1c908b2f01b9f5'/>
<id>urn:sha1:343f2c51a4cc44aa5ae3a813ae1c908b2f01b9f5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: use getline idiomatically</title>
<updated>2022-02-05T08:18:08Z</updated>
<author>
<name>Pranjal Kole</name>
<email>pranjal.kole7@gmail.com</email>
</author>
<published>2022-02-04T13:00:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=06fdebbbcbc47562e4703a9c9ac3c2c16bb545c5'/>
<id>urn:sha1:06fdebbbcbc47562e4703a9c9ac3c2c16bb545c5</id>
<content type='text'>
getline(3) contains an example program at the end, showing its usage.

A few other changes have also been made.
</content>
</entry>
<entry>
<title>config: don't pass null strings to *printf()</title>
<updated>2022-02-05T06:20:41Z</updated>
<author>
<name>Pranjal Kole</name>
<email>pranjal.kole7@gmail.com</email>
</author>
<published>2022-01-29T17:40:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=65b5469e86dc57969cac2109ce5bd53a88164b08'/>
<id>urn:sha1:65b5469e86dc57969cac2109ce5bd53a88164b08</id>
<content type='text'>
musl and glibc's *printf() convert NULL strings to "(null)" [0][1], but
this is undefined behaviour.

context.value has to be set to two backspaces, so that the extra colon
is removed. context.key is set to one backspace, so that the extra dot
is removed. context.section is now set to "main" by default, so it is
never NULL.

[0]: https://git.musl-libc.org/cgit/musl/tree/src/stdio/vfprintf.c#n593
[1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=stdio-common/vfprintf-internal.c;hb=HEAD#l1011
</content>
</entry>
</feed>
