<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/client.c, branch 1.21.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.21.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.21.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-03-14T20:15:11Z</updated>
<entry>
<title>main/client: simplify code for printing --version string</title>
<updated>2025-03-14T20:15:11Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2025-03-14T20:15:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=eb9357709bfd521a87f5fc4232bf37ce360a0317'/>
<id>urn:sha1:eb9357709bfd521a87f5fc4232bf37ce360a0317</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: require wayland-protocols &gt;= 1.41</title>
<updated>2025-03-13T12:28:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-12T16:53:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d48a1c53f59e8b7c99c18f4e4a5693ca0b10bd52'/>
<id>urn:sha1:d48a1c53f59e8b7c99c18f4e4a5693ca0b10bd52</id>
<content type='text'>
</content>
</entry>
<entry>
<title>render: gamma-correct blending</title>
<updated>2025-03-05T17:45:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-21T10:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ccf625b9914917e131beb83379c526bab1927edc'/>
<id>urn:sha1:ccf625b9914917e131beb83379c526bab1927edc</id>
<content type='text'>
This implements gamma-correct blending, which mainly affects font
rendering.

The implementation requires compile-time availability of the new
color-management protocol (available in wayland-protocols &gt;= 1.41),
and run-time support for the same in the compositor (specifically, the
EXT_LINEAR TF function and sRGB primaries).

How it works: all colors are decoded from sRGB to linear (using a
lookup table, generated in the exact same way pixman generates it's
internal conversion tables) before being used by pixman. The resulting
image buffer is thus in decoded/linear format. We use the
color-management protocol to inform the compositor of this, by tagging
the wayland surfaces with the 'ext_linear' image attribute.

Sixes: all colors are sRGB internally, and decoded to linear before
being used in any sixels. Thus, the image buffers will contain linear
colors. This is important, since otherwise there would be a
decode/encode penalty every time a sixel is blended to the grid.

Emojis: we require fcft &gt;= 3.2, which adds support for sRGB decoding
color glyphs. Meaning, the emoji pixman surfaces can be blended
directly to the grid, just like sixels.

Gamma-correct blending is enabled by default *when the compositor
supports it*. There's a new option to explicitly enable/disable it:
gamma-correct-blending=no|yes. If set to 'yes', and the compositor
does not implement the required color-management features, warning
logs are emitted.

There's a loss of precision when storing linear pixels in 8-bit
channels. For this reason, this patch also adds supports for 10-bit
surfaces. For now, this is disabled by default since such surfaces
only have 2 bits for alpha. It can be enabled with
tweak.surface-bit-depth=10-bit.

Perhaps, in the future, we can enable it by default if:

* gamma-correct blending is enabled
* the user has not enabled a transparent background
</content>
</entry>
<entry>
<title>client: port bfabc5450b3a01c7d701809b3cf6158220ea289e to footclient</title>
<updated>2025-01-24T05:51:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-24T05:51:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=787e886ff0281e53432366cca8456c210d3a919c'/>
<id>urn:sha1:787e886ff0281e53432366cca8456c210d3a919c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>features: add +/-system-bell to version output</title>
<updated>2025-01-17T10:22:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-17T10:22:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=aeb28e33fa774e9d00ffbc1054c6152ebe54babd'/>
<id>urn:sha1:aeb28e33fa774e9d00ffbc1054c6152ebe54babd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>util: add streq() function and use in place of strcmp(...) == 0</title>
<updated>2024-02-05T11:09:52Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-01-24T23:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e0f3703ae6c4084f9275cfc78d87e5604cc27a10'/>
<id>urn:sha1:e0f3703ae6c4084f9275cfc78d87e5604cc27a10</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Codespell fixes</title>
<updated>2023-10-03T12:11:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-10-03T12:11:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=58d967b2f31ebe1f16bd0915f28ec93919d3fddc'/>
<id>urn:sha1:58d967b2f31ebe1f16bd0915f28ec93919d3fddc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: cursor-shape-v1 is now always available</title>
<updated>2023-08-07T14:53:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-31T14:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=698c5b54f32c885304d5e2ff55580ce7f52b5da7'/>
<id>urn:sha1:698c5b54f32c885304d5e2ff55580ce7f52b5da7</id>
<content type='text'>
Since we're requiring wayland-protocols &gt;= 1.32
</content>
</entry>
<entry>
<title>wayland: fractional-scale-v1 is now always available</title>
<updated>2023-08-07T14:53:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-31T14:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7eee415b7573f5a20852c6e29001945149e920a2'/>
<id>urn:sha1:7eee415b7573f5a20852c6e29001945149e920a2</id>
<content type='text'>
Since we're requiring wayland-protocols &gt;= 1.32
</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>main/client: add a version feature flag for cursor-shape</title>
<updated>2023-07-03T12:36:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-29T14:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a361d7917b311cad2def1ef42e740670cbddd7b1'/>
<id>urn:sha1:a361d7917b311cad2def1ef42e740670cbddd7b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feature: add a feature flag (for --version) for fractional scaling</title>
<updated>2023-06-29T13:38:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-26T16:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9db92bd942706d6d0ca0250d6011c49ec88f4051'/>
<id>urn:sha1:9db92bd942706d6d0ca0250d6011c49ec88f4051</id>
<content type='text'>
</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>main/client: use $PWD for cwd, when $PWD is valid</title>
<updated>2022-10-02T18:11:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-09-26T17:09:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=90ce4f3008a7c7f01dcdee4504b9c512c96a41d1'/>
<id>urn:sha1:90ce4f3008a7c7f01dcdee4504b9c512c96a41d1</id>
<content type='text'>
If $PWD is set, and its resolved path matches the *actual* working
directory, use $PWD for cwd when instantiating the terminal.

This makes a difference when $PWD refers to a symlink; before this
patch, we’d instantiate the terminal in the *resolved* path. Now it’ll
use the symlink instead.
</content>
</entry>
<entry>
<title>client/slave: explictly add ‘extern char **environ’</title>
<updated>2022-04-12T13:07:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-11T11:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fd414f79be177b23a67ce87b81657c2bfd80a35e'/>
<id>urn:sha1:fd414f79be177b23a67ce87b81657c2bfd80a35e</id>
<content type='text'>
It’s not in any header files on FreeBSD.
</content>
</entry>
<entry>
<title>client: refactor: add send_string_list() function</title>
<updated>2022-04-12T13:07:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-11T10:38:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=261797ec5692b4958d806cf5f639f1cf8f890928'/>
<id>urn:sha1:261797ec5692b4958d806cf5f639f1cf8f890928</id>
<content type='text'>
Use it to send ‘overrides’ and ‘envp’
</content>
</entry>
<entry>
<title>client: add -E,--client-environment</title>
<updated>2022-04-12T13:07:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-11T10:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d02124902b4e27c3ed3ef48442ce17c5e0af9d56'/>
<id>urn:sha1:d02124902b4e27c3ed3ef48442ce17c5e0af9d56</id>
<content type='text'>
When this option is used, the child process in the new terminal
instance will inherit its environment from the footclient process,
instead of the foot server’s.

Implemented by sending (yet another) dynamic string list as part of
the client -&gt; server setup packet. When the new option is *not* used,
the setup packet is now 2 bytes larger than before.

On the server side, the slave process now uses execvpe() instead of
execvp(). There’s plumbing to propagate a new ‘envp’ argument from
term_init() all the way down to slave_exec(). If ‘envp’ is NULL, we
use ‘environ’ instead (thus matching the old behavior of execvp()).

Closes #1004
</content>
</entry>
<entry>
<title>Explicitly initialize sigaction::sa_mask members with sigemptyset(3)</title>
<updated>2022-02-12T12:26:42Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2022-02-12T12:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=23cf80667a36aaff1865fc50afab3f98a796cf14'/>
<id>urn:sha1:23cf80667a36aaff1865fc50afab3f98a796cf14</id>
<content type='text'>
Not doing so before calling sigaction(3) is "undefined" according to
POSIX[1]:

&gt; Applications shall call either sigemptyset() or sigfillset() at least
&gt; once for each object of type sigset_t prior to any other use of that
&gt; object. If such an object is not initialized in this way, but is
&gt; nonetheless supplied as an argument to any of pthread_sigmask(),
&gt; sigaction(), sigaddset(), sigdelset(), sigismember(), sigpending(),
&gt; sigprocmask(), sigsuspend(), sigtimedwait(), sigwait(), or
&gt; sigwaitinfo(), the results are undefined.

The use of designated initializers means that sa_mask members were
still being initialized, but sigset_t is an opaque type and implicit
initialization doesn't necessarily produce the same results as using
sigemptyset(3) (although it typically does on most implementations).

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaddset.html
</content>
</entry>
<entry>
<title>foot{,client}: handle argc == 0</title>
<updated>2022-01-01T20:17:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-01-01T20:11:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9f26b250bbc1d97f1093a0997bfd5ccc504a56b2'/>
<id>urn:sha1:9f26b250bbc1d97f1093a0997bfd5ccc504a56b2</id>
<content type='text'>
Our getopt_long() based argument parser would (correctly) break out of
the while loop immediately. However, we would then proceed and
decrement ‘argc’ by 1, resulting in it being -1.

This was then passed to the terminal constructor, which passed it on
to the client application fork+exec logic. That finally resulted in an
exec(3) failure:

   err: slave.c:339: SHELL=/bin/zsh: failed to execute: No such file or directory
   err: fdm.c:215: no such FD: 7
  info: main.c:604: goodbye
</content>
</entry>
<entry>
<title>foot/client: implement xdga client activation</title>
<updated>2021-11-01T01:52:29Z</updated>
<author>
<name>Ronan Pigott</name>
<email>rpigott@berkeley.edu</email>
</author>
<published>2021-10-29T00:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8'/>
<id>urn:sha1:99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8</id>
<content type='text'>
This is an application of the xdg activation protocol that will allow
compositors to associate new foot toplevels with the command that
launched them.

footclient receives an activation token from the launcher which the
compositor can use to track application startup. It passes the token
to the foot server, which then activates the new window with the token
to complete the startup sequence.
</content>
</entry>
</feed>
