<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/config.c, branch 1.7.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-03-16T08:54:32Z</updated>
<entry>
<title>config: open_config(): remove unused argument ‘conf’</title>
<updated>2021-03-16T08:54:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-16T08:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=11f2c85acf84b39cee2dae32b7a926a1e9a28968'/>
<id>urn:sha1:11f2c85acf84b39cee2dae32b7a926a1e9a28968</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: repair key combos containing both explicit modifier and shifted symbol</title>
<updated>2021-03-04T08:43:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-02T16:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a5b554761a8b376657be2a7e613b37fd5803920c'/>
<id>urn:sha1:a5b554761a8b376657be2a7e613b37fd5803920c</id>
<content type='text'>
If a user-provided key combo contains both an explicit modifier, and
the shifted symbol it produces, replace the symbol with its un-shifted
version.

Example: Control+Shift+U contains both ‘Shift’, and ‘U’, where ‘Shift’
is the modifier that shifts ‘u’ to ‘U’.

Such modifiers are “consumed”, i.e. filtered out, when matching key
combos. As such, Control+Shift+U will never trigger since we’ll never
be able to match the consumed modifier ‘Shift’.

The above combo can be written in two ways:

- Control+U
- Control+Shift+u

To be able to detect that Control+Shift+U is an invalid combination,
we need to check all *shifted* symbols for all key *codes*.

Once we’ve detected a shifted symbol (and where it differs from the
un-shifted symbol), we loop all modifier sets that produce the shift
level where our shifted symbol is. For each such set, check if it
intersects with the user-provided key combo’s modifier set.

If there is an intersection, it means the user provided a key combo
containing a modifier and symbol, such that the modifier is consumed
when the symbol is produced.

In this case, we replace the symbol with its un-shifted version.
</content>
</entry>
<entry>
<title>config: parse_key_combos: lower case manually, instead of calling tolower()</title>
<updated>2021-03-04T08:43:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-28T10:38:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1b4d9eade004c9050a918563e00d56de965d97e2'/>
<id>urn:sha1:1b4d9eade004c9050a918563e00d56de965d97e2</id>
<content type='text'>
tolower() is locale dependent, something we do not want in this case.
</content>
</entry>
<entry>
<title>config: fix default key binding for extend-to-next-whitespace</title>
<updated>2021-03-04T08:43:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-27T20:33:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cfa82bc920bcc8990e4b2af5f3d2d8e4565e37f6'/>
<id>urn:sha1:cfa82bc920bcc8990e4b2af5f3d2d8e4565e37f6</id>
<content type='text'>
Bindings now use lower-cased keys
</content>
</entry>
<entry>
<title>input: rewrite of how we match foot’s own key bindings</title>
<updated>2021-03-04T08:43:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-27T19:42:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5e64e06a550c2499a23f03749986791136cbbcb9'/>
<id>urn:sha1:5e64e06a550c2499a23f03749986791136cbbcb9</id>
<content type='text'>
Bindings are matched in one out of three ways:

* By translated (by XKB) symbols
* By untranslated symbols
* By raw key codes

A translated symbol is affected by pressed modifiers, some of which
can be “consumed”. Consumed modifiers to not partake in the comparison
with the binding’s modifiers. In this mode, ctrl+shift+2 maps to
ctrl+@ on a US layout.

Untranslated symbols, or un-shifted symbols refer to the “base” symbol
of the pressed key, i.e. it’s unaffected by modifiers. In this mode,
consumed modifiers *do* partake in the comparison with the binding’s
modifiers, and ctrl+shift+2 maps to ctrl+shift+2 on a US layout.

More examples: ctrl+shift+u maps to ctrl+U in the translated lookup,
while ctrl+shift+u maps to ctrl+shift+u in the untranslated lookup.

Finally, we also match raw key codes. This allows our bindings to work
using the same physical keys when the user switches between latin and
non-latin layouts.

This means key bindings in foot.ini *must* not include both +shift+
and a *shifted* key. I.e. ctrl+shift+U is not a valid combo as it
cannot be triggered. Unfortunately, this was how you were supposed to
write bindings up until now... so, we try to detect such bindings, log
a deprecation warning and then “fix” the binding for the user.

When specifying bindings in foot.ini, both ctrl+U and ctrl+shift+u are
valid, and will work. The latter is preferred though, since we cannot
detect the raw key code for the former variant. Personally, I also
prefer the latter one because it is more explicit; it’s more obvious
which keys are involved.

However, in some cases it makes more sense to use the other
variant. Typically for non-letter combos.
</content>
</entry>
<entry>
<title>Fix typo.</title>
<updated>2021-03-01T12:44:46Z</updated>
<author>
<name>L3MON4D3</name>
<email>Simljk@outlook.de</email>
</author>
<published>2021-03-01T12:44:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=093df837ca7623d6ba3191f72cada4d726108d64'/>
<id>urn:sha1:093df837ca7623d6ba3191f72cada4d726108d64</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: reuse HAVE_TERMINFO via DEFAULT_TERM</title>
<updated>2021-02-26T14:15:05Z</updated>
<author>
<name>Chloe Kudryavtsev</name>
<email>toast@toast.cafe</email>
</author>
<published>2021-02-26T21:23:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=80b95eeb7e66e287a214ca61f765b7da78f2bc2c'/>
<id>urn:sha1:80b95eeb7e66e287a214ca61f765b7da78f2bc2c</id>
<content type='text'>
add detection in --help output
also make it more easily accessible for other locations to change
</content>
</entry>
<entry>
<title>Merge branch 'rename-_errno'</title>
<updated>2021-02-22T08:28:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-22T08:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3d7207f9c56808ce623c8cd6ba003ec3e7a0a556'/>
<id>urn:sha1:3d7207f9c56808ce623c8cd6ba003ec3e7a0a556</id>
<content type='text'>
</content>
</entry>
<entry>
<title>errno: don’t use ‘_errno’ as a variable name; _ are reserved for use as identifiers</title>
<updated>2021-02-21T19:33:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-21T19:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=555f751f94a7efa90f03713a876f41f2424ea9f0'/>
<id>urn:sha1:555f751f94a7efa90f03713a876f41f2424ea9f0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: typo: osc8-underline=always means ALWAYS</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-19T07:44:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=21a355f38a03391f7d9fc2a67b46e5214102c59a'/>
<id>urn:sha1:21a355f38a03391f7d9fc2a67b46e5214102c59a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: osc8-underline: default to ‘url-mode’</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-16T10:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=35779ec4e51be0fa23200fdb782981de2a9fa82d'/>
<id>urn:sha1:35779ec4e51be0fa23200fdb782981de2a9fa82d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>urls: OSC-8 URLs can now optionally be underlined outside of url-mode</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T20:29:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2074f8b6563b7a6331c94a9231cd5b5af8bd7ade'/>
<id>urn:sha1:2074f8b6563b7a6331c94a9231cd5b5af8bd7ade</id>
<content type='text'>
This patch adds a new configuration option,
‘osc8-underline=url-mode|always’.

When set to ‘url-mode’, OSC-8 URLs are only
highlighted (i.e. underlined) in url-mode, just like auto-detected
URLs.

When set to ‘always’, they are always underlined, regardless of mode,
and regardless of their other attributes.

This is implemented by tagging collected URLs with a boolean,
instructing urls_render() and urls_reset() whether they should update
the cells’ ‘url’ attribute or not.

The OSC-8 collecter sets this based on the value of ‘osc8-underline’.

Finally, when closing an OSC-8 URL, the cells are immediately tagged
with the ‘url’ attribute if ‘osc8-underline’ is set to ‘always’.
</content>
</entry>
<entry>
<title>config: change default key binding for toggle-url-visible to ‘t’</title>
<updated>2021-02-21T19:15:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T15:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4ff5154cb8ce932bdbdb21fc96eb4d49d1371bea'/>
<id>urn:sha1:4ff5154cb8ce932bdbdb21fc96eb4d49d1371bea</id>
<content type='text'>
</content>
</entry>
<entry>
<title>urls: add key binding that toggles whether URLs are displayed on jump-label</title>
<updated>2021-02-21T19:15:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T13:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=06a9ffa7632abf201b0ea0270bb5058af4fc4a6b'/>
<id>urn:sha1:06a9ffa7632abf201b0ea0270bb5058af4fc4a6b</id>
<content type='text'>
By default, the URL isn’t shown on the jump-label. For auto-detect
URLs, doing so is virtually always useless, as the URL is already
visible in the grid.

For OSC-8 URLs however, the URL is often _not_ visible in the
grid. Many times, seeing the URL is still not needed (if you’re doing
‘ls --hyperlink’, you already know what the URIs are).

But it is still useful to have a way to show the URLs.

This patch adds a new key binding action that can be used in url-mode
to toggle the URL on and off in the jump label.

It is bound to ctrl+t by default.
</content>
</entry>
<entry>
<title>config: add jump-label-letters option</title>
<updated>2021-02-13T10:42:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-13T10:42:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7bcab0106870b5c1d3de3990d31673b64ab3e9de'/>
<id>urn:sha1:7bcab0106870b5c1d3de3990d31673b64ab3e9de</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: refactor: add str_to_wchars(), use it when parsing word-delimiters</title>
<updated>2021-02-13T10:42:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-13T10:42:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=94266b99d7a804008912f2354f8d8e7ed55d60a4'/>
<id>urn:sha1:94266b99d7a804008912f2354f8d8e7ed55d60a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Convert some uses of xassert(false) to BUG("some error message")</title>
<updated>2021-02-09T13:52:33Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-02-09T13:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1ec56844387ed910b7e87bae186b58cc22cc317a'/>
<id>urn:sha1:1ec56844387ed910b7e87bae186b58cc22cc317a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'refactor-key-bindings'</title>
<updated>2021-02-08T17:57:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-08T17:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=79e054faff0d6d49d44ef0c1c052387eb66581d0'/>
<id>urn:sha1:79e054faff0d6d49d44ef0c1c052387eb66581d0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>misc: when free:ing tll lists, prefer tll_remove() over tll_free()</title>
<updated>2021-02-08T09:09:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-07T13:52:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4bad85b59334467ac839ed2dd91abb6625bc5b89'/>
<id>urn:sha1:4bad85b59334467ac839ed2dd91abb6625bc5b89</id>
<content type='text'>
In many places we have the following pattern:

  tll_foreach(list, it)
     free(it-&gt;item.thing);
  tll_free(list);

Since all tll functions are macros, and thus inlined, and since
tll_free in itself expands to a tll_foreach(), the above pattern
expands to more native code than necessary.

This is somewhat smaller:

  tll_foreach(list, it) {
      free(it-&gt;item.thing);
      tll_remove(list, it);
  }
</content>
</entry>
<entry>
<title>key-bindings: refactor: use a single type for all key bindings</title>
<updated>2021-02-08T09:09:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-07T13:46:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=03bac9dada76690971943f824637407100f7a3ee'/>
<id>urn:sha1:03bac9dada76690971943f824637407100f7a3ee</id>
<content type='text'>
Up until now, the various key binding modes (“normal”, “search” and
“url”) have used their own struct definitions for their key bindings.

The only reason for this was to have a properly typed “action” (using
the appropriate “action” enum).

This caused lots of duplicated code. This patch refactors this to use
a single struct definition for the “unparsed” key bindings handled by
the configuration, and another single definition for “parsed” bindings
used while handling input.

This allows us to implement configuration parsing, keymap translation
and so on using one set of functions, regardless of key binding mode.
</content>
</entry>
</feed>
