<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/client.c, branch 1.9.1</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.9.1</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.9.1'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-09-18T22:40:40Z</updated>
<entry>
<title>main/client: add no-op "-e" command-line option</title>
<updated>2021-09-18T22:40:40Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-09-18T22:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ef7919e64d09d4b29a1557641883e78f5896841d'/>
<id>urn:sha1:ef7919e64d09d4b29a1557641883e78f5896841d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>main/client: replace some uses of printf() with puts() in print_usage()</title>
<updated>2021-09-18T18:44:04Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-09-18T18:44:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=537cd9b367beece55691fb739f0834e2e96571b6'/>
<id>urn:sha1:537cd9b367beece55691fb739f0834e2e96571b6</id>
<content type='text'>
FOOT_DEFAULT_TERM is a string literal passed as a -D argument to
the compiler, so it can just be concatenated with the other string
literals, instead of being formatted with printf().
</content>
</entry>
<entry>
<title>terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS</title>
<updated>2021-08-17T19:04:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-07T14:42:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=76391868650240b2314a66d182e4d07cf8491f54'/>
<id>urn:sha1:76391868650240b2314a66d182e4d07cf8491f54</id>
<content type='text'>
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.

Since:

* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
  capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
  ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
  have the latest ncurses.

we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.

Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.

The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.

Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?

I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.

To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.

The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.

In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.

To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:

-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.

-Dcustom-terminfo-install-location=&lt;path&gt;: *where* the terminfo files
are expected to be found.

This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.

This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).

-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.

Closes #671
</content>
</entry>
<entry>
<title>client: remove info log of client app’s exit-code</title>
<updated>2021-07-30T13:38:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-30T13:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0b6ec4da71c4eb466303688e21230bce96945dcc'/>
<id>urn:sha1:0b6ec4da71c4eb466303688e21230bce96945dcc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>log: add LOG_CLASS_NONE and use as initializer for log_level</title>
<updated>2021-06-26T21:15:09Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-06-26T21:15:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5dca0458a09ebc586fda49c50533976f055d8de2'/>
<id>urn:sha1:5dca0458a09ebc586fda49c50533976f055d8de2</id>
<content type='text'>
This means that logging will be completely disabled until log_init()
has been called, which is useful to prevent log spam when running
UNITTEST{} blocks in debug builds.

Note that this doesn't change the default log level at runtime, which
was already being set to LOG_CLASS_INFO in main.c and client.c.

The new log level is also exposed to the command-line interface as
`--log-level=none`, which allows disabling logging entirely.
</content>
</entry>
<entry>
<title>client: add +/-graphemes to version output</title>
<updated>2021-06-24T15:50:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-24T15:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3f0f5ec3b7ee5bdbdc085f133920b83a611601b8'/>
<id>urn:sha1:3f0f5ec3b7ee5bdbdc085f133920b83a611601b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: make sure ‘fd’ is initialized in all error paths</title>
<updated>2021-06-23T13:32:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T13:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=15e7e802456404d077bc23c6de01b5979f0a7484'/>
<id>urn:sha1:15e7e802456404d077bc23c6de01b5979f0a7484</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: add and use function push_override()</title>
<updated>2021-06-23T13:12:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T13:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5fc8275eb2385933a1f068a4476ddfc28afce584'/>
<id>urn:sha1:5fc8275eb2385933a1f068a4476ddfc28afce584</id>
<content type='text'>
We now track override data (length + malloc:ed string) in a struct,
and push this struct to our overrides linked list.

There’s a new function, push_override() that takes a string,
calculates its length, strdup() it and pushes it to the linked
list. This function also length-checks the string, to ensure we don’t
overflow.

This way, we don’t have to loop the overrides list twice; once when
calculating the total length of all overrides, and once when sending
the overrides to the server.

Now, we can update the total length as we add overrides (i.e while
parsing the command line, instead of afterwards).

This means we only have to loop the list once, and that’s when sending
it. This also means there’s no longer any need to malloc an array
holding the lengths of each override.
</content>
</entry>
<entry>
<title>client: implement -o,--override</title>
<updated>2021-06-23T13:12:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T12:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=63a64bdca1978814ade32949e4cbf0d9758e6cbe'/>
<id>urn:sha1:63a64bdca1978814ade32949e4cbf0d9758e6cbe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: send overrides for everything that is publicly visible in the conf</title>
<updated>2021-06-23T13:12:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T12:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=136d60606a1e01eb68ed984de63b7a55f8966075'/>
<id>urn:sha1:136d60606a1e01eb68ed984de63b7a55f8966075</id>
<content type='text'>
Send a generic “overrides” list to the server, containing options in
text, on the format “section.key=value”.

This reduces the size of the base client/server protocol packet, as
well as opens up for a generic -o,--override command line option (not
yet implemented).
</content>
</entry>
<entry>
<title>main/client: change exit code</title>
<updated>2021-05-04T08:41:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-01T08:46:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=da923100cad1000252c87b02a4132ce5878a28ec'/>
<id>urn:sha1:da923100cad1000252c87b02a4132ce5878a28ec</id>
<content type='text'>
* foot exits with -26/230
* footclient exits with -36/220

This is to give each application a range of exit codes. Currently
unused, but we may want to change this in the future.
</content>
</entry>
<entry>
<title>foot/footclient: use a custom exit code when foot/footclient fail to run</title>
<updated>2021-05-04T08:40:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-30T20:47:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a1b41bd186147f3f028030e9079821d0bfa7b3f6'/>
<id>urn:sha1:a1b41bd186147f3f028030e9079821d0bfa7b3f6</id>
<content type='text'>
Normally, foot and footclient uses the exit code from the client
application (i.e. the shell).

However, foot (or footclient) itself may fail to run; if run outside
of a Wayland session, or no fonts are installed, or the client
application/shell cannot be found (“foot lsdjfldsjf”) etc.

Up until now, there has been no way to differentiate these kind of
failures from the client application exiting with code 1.

This patch changes foot’s failure exit code to -27/229, and
footclient’s to -28/228. Note that footclient will exit with foot’s
-27/229 if footclient ran successfully, but the foot server failed to
instantiate a new window.

Closes #466.
</content>
</entry>
<entry>
<title>features: --version now logs +/-pgo</title>
<updated>2021-03-26T19:30:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-26T19:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9b20764f35094963ecbfc40a972ef54443630447'/>
<id>urn:sha1:9b20764f35094963ecbfc40a972ef54443630447</id>
<content type='text'>
That is, whether the binary was compiled with PGO or not.
</content>
</entry>
<entry>
<title>add option to detach the client process from the terminal instance</title>
<updated>2021-03-13T08:48:55Z</updated>
<author>
<name>Felipe Trzaskowski</name>
<email>felipe.trzaskowski@gmail.com</email>
</author>
<published>2021-03-12T23:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3ed93142667f052909beae43463501df37a4dcca'/>
<id>urn:sha1:3ed93142667f052909beae43463501df37a4dcca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: repair usage output</title>
<updated>2021-03-12T20:53:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-12T20:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=464851fac1284095e33b6f00500d000ecdf2394d'/>
<id>urn:sha1:464851fac1284095e33b6f00500d000ecdf2394d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: remove excess ‘-’ from ‘--log-level’ in usage</title>
<updated>2021-03-12T20:51:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-12T20:51:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=84f840a1972288d59804bd62b9928575d86ac553'/>
<id>urn:sha1:84f840a1972288d59804bd62b9928575d86ac553</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: -D,--working-directory: check path exists and is a directory</title>
<updated>2021-02-13T09:48:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-13T09:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5b0ebee290393394d18337f9d707f6b532d3f2a5'/>
<id>urn:sha1:5b0ebee290393394d18337f9d707f6b532d3f2a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>main/client: add -D,--working-directory=DIR</title>
<updated>2021-02-12T20:42:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-12T08:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=19868c9c8d29cba0f22dafcf9b92ffffc76bd1e7'/>
<id>urn:sha1:19868c9c8d29cba0f22dafcf9b92ffffc76bd1e7</id>
<content type='text'>
This overrides the CWD the slave process chdir()’s into before
exec:ing the client application.
</content>
</entry>
<entry>
<title>main/client: add missing short options to usage (--help output)</title>
<updated>2021-02-12T08:02:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-12T08:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=59b127dc6909399711aef48149f86845b46dbd1f'/>
<id>urn:sha1:59b127dc6909399711aef48149f86845b46dbd1f</id>
<content type='text'>
Initially, these options *did not* have short options. Then, in
e81388336750a20a2da98a57e9726c8ba1b481e3, the short options were added
to footclient’s getopt_long() call.

This was in a sense incorrect. But instead of reverting it, the short
options were made official in
8eaa1959904ecff0e7e75d152220344457912f76, by adding the short options
to foot, documenting them in the man pages, and adding them to the
shell completions.

Though the commit message of 8eaa1959904ecff0e7e75d152220344457912f76
says the options have now been included in usage(), they were in
fact *not* added to usage.

This patch does just that.
</content>
</entry>
<entry>
<title>main: client: factor out some common code for "--log-level" option</title>
<updated>2021-02-11T11:08:18Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-02-11T11:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5437321f97e21a3fc6fca79fbdf05ca8d6199b35'/>
<id>urn:sha1:5437321f97e21a3fc6fca79fbdf05ca8d6199b35</id>
<content type='text'>
</content>
</entry>
</feed>
