<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/doc/footclient.1.scd, branch 1.22.3</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.22.3</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.22.3'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-01-11T15:37:17Z</updated>
<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>footclient: fallback logic when socket paths don't exist</title>
<updated>2023-07-21T06:12:49Z</updated>
<author>
<name>Max Gautier</name>
<email>mg@max.gautier.name</email>
</author>
<published>2023-03-09T13:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c12db68363131d189d8410bf2994d70919229021'/>
<id>urn:sha1:c12db68363131d189d8410bf2994d70919229021</id>
<content type='text'>
Even if WAYLAND_DISPLAY / XDG_RUNTIME_DIR are defined, if we can't
find the corresponding socket, we fallback to the path used when they
are not defined.
</content>
</entry>
<entry>
<title>.desktop: remove StartupWMClass from server, use distinct StartupWMClass for foot and footclient</title>
<updated>2023-05-22T16:57:54Z</updated>
<author>
<name>jdevdevdev</name>
<email>jdevdevdev@noreply.codeberg.org</email>
</author>
<published>2023-05-01T15:53:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=134b54dfe0e4d142ac4b6b7fe25e84485ba63387'/>
<id>urn:sha1:134b54dfe0e4d142ac4b6b7fe25e84485ba63387</id>
<content type='text'>
For this to work, the default app-id of footclient has been changed
from ‘foot’ to ‘footclient’.

By using distinct StartupWMClasses, the compositor can connect a
running foot/footclient instance to the correct .desktop-file. This
ensures the correct icon is being used in e.g. docks, and that actions
like “open another window” works correctly.

Note that the user can override the app-id, either by setting app-id
in foot.ini, or with the -a,--app-id command line option.

Closes #1355
</content>
</entry>
<entry>
<title>slave: unset TERM_PROGRAM{,_VERSION}</title>
<updated>2023-05-18T15:50:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-05-12T12:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a2f765b72a6612758a034a5b0c24ec08625db1a3'/>
<id>urn:sha1:a2f765b72a6612758a034a5b0c24ec08625db1a3</id>
<content type='text'>
Foot’s policy is to not set environment variables that identifies
it (except the well-known and established `TERM` variable).

We encourage applications to use terminfo to determine capabilities,
or terminal queries, when available. Or, at least use terminal queries
to detect the terminal and its version.

Setting environment variables is a bad idea since they are inherited
by all applications started by the terminal (which is the whole
point). But, this includes other terminal emulators, making it very
possible a terminal emulator gets mis-detected just because it was
started from another terminal.

Since there are a couple of terminal emulators that _do_ set
TERM_PROGRAM and TERM_PROGRAM_VERSION, unset these environment
variables to avoid being misdetected.

Closes #1349
</content>
</entry>
<entry>
<title>slave: set $TERM_PROGRAM and $TERM_PROGRAM_VERSION environment variables</title>
<updated>2023-03-20T14:40:36Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2023-03-20T14:40:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5b2f02d826d8043b6b89860c56802ea5fed0f3bd'/>
<id>urn:sha1:5b2f02d826d8043b6b89860c56802ea5fed0f3bd</id>
<content type='text'>
These are already being set by iTerm2, WezTerm, tmux and likely some
others. Even though using yet more environment variables seems rather
questionable, if we don't set these we run the risk of inheriting them
from other terminals.

See also:

* https://gitlab.com/gnachman/iterm2/-/blob/97a6078df8e822da165e91737a01c0b9e115dd16/sources/PTYSession.m#L2568-2570
* https://github.com/tmux/tmux/blob/1d0f68dee9f71c504e03616fa472a408a6caa49b/environ.c#L263-L264
* https://github.com/search?q=TERM_PROGRAM&amp;type=code
</content>
</entry>
<entry>
<title>change default log level to WARNING</title>
<updated>2022-11-22T15:22:22Z</updated>
<author>
<name>Antoine Beaupré</name>
<email>anarcat@debian.org</email>
</author>
<published>2022-11-18T16:07:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b80c7f75fea0c1a69471d1f67aa97b584d3e48b2'/>
<id>urn:sha1:b80c7f75fea0c1a69471d1f67aa97b584d3e48b2</id>
<content type='text'>
The default foot output looks like this, in Debian testing "bookworm"
at the time of writing:

    anarcat@angela:pubpaste$ foot true
    info: main.c:421: version: 1.13.1 +pgo +ime +graphemes -assertions
    info: main.c:428: arch: Linux x86_64/64-bit
    info: main.c:440: locale: fr_CA.UTF-8
    info: config.c:3003: loading configuration from /home/anarcat/.config/foot/foot.ini
    info: fcft.c:338: fcft: 3.1.5 +graphemes -runs +svg(nanosvg) -assertions
    info: fcft.c:377: fontconfig: 2.13.1, freetype: 2.12.1, harfbuzz: 5.2.0
    info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Regular.otf: size=8.00pt/8px, dpi=75.00
    info: wayland.c:1353: eDP-1: 2256x1504+0x0@60Hz 0x095F 13.32" scale=2 PPI=205x214 (physical) PPI=136x143 (logical), DPI=271.31
    info: wayland.c:1509: requesting SSD decorations
    info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Bold.otf: size=24.00pt/32px, dpi=96.00
    info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Regular.otf: size=24.00pt/32px, dpi=96.00
    info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Bold.otf: size=24.00pt/32px, dpi=96.00
    info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Regular.otf: size=24.00pt/32px, dpi=96.00
    info: terminal.c:700: cell width=19, height=39
    info: terminal.c:588: using 16 rendering threads
    info: wayland.c:859: using SSD decorations
    info: main.c:680: goodbye
    anarcat@angela:pubpaste$

That's 17 lines of output that are *mostly* useless for most use
cases. I might understand having this output during the project's
startup, when it's helpful for diagnostics, but now Foot just mostly
works everywhere, and I've never had a use for any of that stuff in
the (arguably short) time I've been using Foot so far.

And if I do, there's the `--log-level` commandline option to tweak
this. At first, I looked at tweaking the log level through the config
file. But as explained in this issue:

https://codeberg.org/dnkl/foot/issues/1142

... there's a chicken and egg problem there that makes it hard to
implement and possibly confusing for users as well.

There's also the possibility for users to change the shortcut with
which they start foot, for example a `.desktop` file so that menu
systems that support those start foot properly. But that only works in
that environment, and not through the so many things that will just
call `foot` and hope it will do the right thing.

In my case, I have `foot` hardcoded in a lot of places now, between
sway and waybar, and this is only going to grow. Others have suggested
adding the flag to a $TERMINAL global variable, but that won't help
.desktop users.

So, instead of playing whack-a-mole with the log levels, just make it
so that, by default, foot is silent. This is actually one of the
[basics of UNIX philosophy][1]:

&gt; Rule of Silence: When a program has nothing surprising to say, it
&gt; should say nothing.

And yes, I am aware I am severely violating that principle by writing
a way too long commit log for a one-line patch, but there you go, I
figured it was good to document the why of this properly.

[1]: https://web.archive.org/web/20031102053334/http://www.faqs.org/docs/artu/ch01s06.html
</content>
</entry>
<entry>
<title>doc: fix tiny typo</title>
<updated>2022-10-04T04:04:03Z</updated>
<author>
<name>Nick Hastings</name>
<email>nicholaschastings@gmail.com</email>
</author>
<published>2022-10-04T04:04:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cbebafbfe8d43415fa6baeb59d44bd3be0b593bf'/>
<id>urn:sha1:cbebafbfe8d43415fa6baeb59d44bd3be0b593bf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>doc: document the new ‘environment’ config section</title>
<updated>2022-06-13T09:55:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-05-28T17:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5760bcb3bf168f7c4a695c667ef0316751452803'/>
<id>urn:sha1:5760bcb3bf168f7c4a695c667ef0316751452803</id>
<content type='text'>
</content>
</entry>
<entry>
<title>doc: footclient: codespell</title>
<updated>2022-04-12T13:07:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-11T10:34:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3c6836e32d131e0a0d82fabb0d4f0d5cdbaafeb8'/>
<id>urn:sha1:3c6836e32d131e0a0d82fabb0d4f0d5cdbaafeb8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>doc: footclient: add -E,--client-environment</title>
<updated>2022-04-12T13:07:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-11T10:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fd1e5feda46c36dbddbd68bf970605aedbf84c5d'/>
<id>urn:sha1:fd1e5feda46c36dbddbd68bf970605aedbf84c5d</id>
<content type='text'>
</content>
</entry>
<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>meson: terminfo install location now defaults to $datadir/terminfo</title>
<updated>2021-08-30T17:09:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-29T09:06:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9434066546a8409117083bd64ad43f97a3a236e2'/>
<id>urn:sha1:9434066546a8409117083bd64ad43f97a3a236e2</id>
<content type='text'>
The meson command line option -Dcustom-terminfo-install-location has
been changed in the following ways:

* If unset, $datadir/terminfo is used, and TERMINFO is *not* exported
* If set, that value (relative to $prefix) is used, and TERMINFO *is*
exported.
* The special value ‘no’ is removed.

-Ddefault-terminfo now also changes the terminfo names generated when
-Dterminfo=enabled.

Furthermore, the documentation for the TERMINFO environment variable
has been removed from the foot.1 and footclient.1 man pages (but as
mentioned above, foot *will* still set it if
-Dcustom-terminfo-install-location has been used).

INSTALL.md has been updated to now recommend using ncurses’ terminfo
definitions, if available. But also to document the other
alternatives; installing the terminfo definitions in a custom
location, or installing them with a diferent name. It also describes
the general problem, and the disadvantages of each alternative (but
without going into too much depth).
</content>
</entry>
<entry>
<title>doc: how to pass TERMINFO through ‘doas’</title>
<updated>2021-08-27T18:25:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-27T18:25:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fd78fa98b4765771b65140bc6edfbd472b4f666b'/>
<id>urn:sha1:fd78fa98b4765771b65140bc6edfbd472b4f666b</id>
<content type='text'>
See #692
</content>
</entry>
<entry>
<title>doc: foot{,,client}: document TERMINFO</title>
<updated>2021-08-27T11:31:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-27T11:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6e8da20ee22e07d271a47a53e43f35ba41e55281'/>
<id>urn:sha1:6e8da20ee22e07d271a47a53e43f35ba41e55281</id>
<content type='text'>
Closes #691
</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>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>doc: footclient.1: document -o,--override</title>
<updated>2021-06-23T13:12:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T12:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8640a9c99a320800d0626ff93b8773ccfca8c83b'/>
<id>urn:sha1:8640a9c99a320800d0626ff93b8773ccfca8c83b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>doc: foot{,client}: updates from feedback from @craigbarnes</title>
<updated>2021-06-02T06:10:02Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-01T17:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2ffedc708220179e81aa1b2a271f3f91c7adf36b'/>
<id>urn:sha1:2ffedc708220179e81aa1b2a271f3f91c7adf36b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>doc: footclient.1: -t,--term: add references to ENVIRONMENT and TERMINFO sections</title>
<updated>2021-06-02T06:10:02Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-30T08:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1321b23567597289ed5d4d5feba777bf2bc0c4d4'/>
<id>urn:sha1:1321b23567597289ed5d4d5feba777bf2bc0c4d4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>doc: footclient.1: add TERMINFO section</title>
<updated>2021-06-02T06:10:02Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-30T08:53:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a1a521b81d489916dc91958a1a1ab7f677887a08'/>
<id>urn:sha1:a1a521b81d489916dc91958a1a1ab7f677887a08</id>
<content type='text'>
</content>
</entry>
</feed>
