| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
This is how all other long options are documented in the usage.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tllists are great when dealing with dynamically changing lists. They
are also very easy to use when building lists/arrays where the final
size is unknown.
However, this ease of use comes at a price: code size. tll-macros
expand to a lot of code.
Since things in the config are static, once the config has been
loaded, using tllists for configuration data structures doesn’t make
much sense.
This patch replaces nearly all tllists used by the configuration, with
dynamically allocated arrays.
|
| |
|
|
|
|
|
|
|
| |
Allow any configuration option to be overridden with -o/--override
'section.key=value' arguments, as suggested in #554
update completitions for override
slight refactoring to ease footclient support
|
| |
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Fixes error in Clang builds:
../../foot/main.c:376:19: error: implicit conversion from enumeration type 'enum log_colorize' to different enumeration type 'enum fcft_log_colorize' [-Werror,-Wenum-conversion]
fcft_log_init(log_colorize, as_server && log_syslog, log_level + 1);
~~~~~~~~~~~~~ ^~~~~~~~~~~~
|
| | |
|
| |
|
|
| |
That is, whether the binary was compiled with PGO or not.
|
| |
|
|
|
| |
add detection in --help output
also make it more easily accessible for other locations to change
|
| | |
|
| | |
|
| |
|
|
|
| |
This overrides the CWD the slave process chdir()’s into before
exec:ing the client application.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |\
| |
| |
| | |
Closes #337
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
main.c:13:10: fatal error: 'sys/sysinfo.h' file not found
#include <sys/sysinfo.h>
^~~~~~~~~~~~~~~
main.c:122:28: error: use of undeclared identifier 'S_IRUSR'
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) {
^
main.c:122:38: error: use of undeclared identifier 'S_IWUSR'
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) {
^
main.c:122:48: error: use of undeclared identifier 'S_IRGRP'
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) {
^
main.c:122:58: error: use of undeclared identifier 'S_IROTH'
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) {
^
|
| | |
|
| | |
|
| |
|
|
| |
Closes #287
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
e81388336750a20a2da98a57e9726c8ba1b481e3 added “missing” short command
line options to footclient.
Except they weren’t missing; they were intentionally missing short
options and only supported long options.
This commit makes the new/missing short options “official”, by adding
documentation, zsh completions and including them in usage().
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
These options lets the user configure custom fonts and styles, to use
with the bold and italic cell attributes.
By default, they are unset, meaning we use the bold/italic variants of
the regular font.
Closes #169.
|
| |
|
|
|
| |
Without this, config_load() can’t use wide-character functions
properly.
|
| |
|
|
|
|
|
|
| |
Use the new fcft_set_scaling_filter() API to use a non-default scaling
filter.
By default, we use lanczo3, the ‘best’ filter. This overrides the
default in fcft, which is ‘cubic’ filtering.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add -W,--window-size-chars command line option
* Add initial-window-size-chars foot.ini option
* Add -w,--window-size-pixels command line option
* Add initial-window-size-pixels foot.ini option
* Deprecate -g,--geometry command line option in favor of
-w,--window-size-pixels
* Deprecate geometry option in foot.ini in favor of
initial-window-size-pixels
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Foot is a Wayland client and cannot be run outside of a Wayland
session. As such, it makes more sense to use $WAYLAND_SESSION instead
of $XDG_SESSION_ID in the default socket path since this makes it
clearer which Wayland session we belong to.
Closes #55.
|
| |
|
|
| |
I missed this in f3c301ee8b94c3354080695326ceedc7a3866321 when fixing
|
| |
|
|
|
| |
Instead of refusing to start foot on configuration errors, we start
and print a user-notification.
|
| | |
|
| |
|
|
|
| |
This fixes an issue where e.g. failing to initialize the Wayland
backend would leave cwd un-free:d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When resizing the font on-the-fly, we now do a complete
font-reload (this is basically what fcft_size_adjust() did anyway).
To get the correct size, we maintain the current size ourselves.
We get the initial size from the user-provided font pattern, by
converting the string to an FcPattern, and using FcPatternGet() to
retrieve both the FC_SIZE and FC_PIXEL_SIZE attributes. These
attributes are then removed from the pattern, and the pattern is
converted back to a string.
The terminal struct maintains a copy of the font sizes. These are
initially set to the sizes from the config.
When the user resizes the font, the terminal-local sizes are
adjusted. To ensure the primary and user-configured fallback fonts are
resizes equally much, convert any pixel sizes to point sizes at this
point.
When the font size is reset, we reload the font sizes from the
config (thus once again returning actual pixel-sizes, if that's what
the user has configured).
|
| | |
|
| |
|
|
|
| |
Instead, register their PIDs with the new reaper module and let it
handle them.
|
| |
|
|
|
|
|
|
| |
Use a signalfd to listen for SIGCHLD signals.
When we receive a SIGCHLD over the signalfd, reap all dead children by
looping over all registered child PIDs and call waitpid(WNOHANG) on
them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means command line parsing stops when it encounters the first
nonoption argument.
The result is that one no longer need to use '--' to ensure arguments
are passed to the shell/command, instead of parsed by foot.
That is, instead of
foot -- sh -c true
one can now do
foot sh -c true
Arguments to foot *must* go before the command:
foot --fullscreen sh -c true
|
| |
|
|
|
|
| |
This is the only locale variable we need. This ensures LC_NUMERIC in
particular remains as "C", which is needed by fcft when instantiating
new fonts.
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We now create a copy of the config for each client, and updates it
with the values passed from the client.
Since we're not actually cloning it (and e.g. strdup() all strings
etc) we can't call conf_destroy() to free it, but need to free just
the strings we've replaced.
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
When specified, our PID is written to the specified file (or FD),
after we've successfully started up.
|
| |
|
|
|
|
|
| |
When specified, our PID is written to the specified file (or FD),
after we've successfully started up.
Only applicable in server mode.
|
| |
|
|
| |
When specified, we don't exit when the slave/client process exits.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, we end up calling render_refresh() multiple times in
the same FDM iteration. This means will render the first update
immediately, and then set the 'pending' flag, causing the updated
content to be rendered in the next frame.
This can cause flicker, or flashes, since we're presenting one or more
intermediate frames until the final content is shown.
Not to mention that it is inefficient to render multiple frames like
this.
Fix by:
* render_refresh() only sets a flag in the terminal
* install an FDM hook; this hook loops all terminals and executes what
render_refresh() _used_ to do (that is, render immediately if we're
not waiting for a frame callback, otherwise set 'pending' flag). for
all terminals that have the 'refresh_needed' flag set.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a flag, -p,--presentation-timings, that enables input lag
measuring using the presentation time Wayland protocol.
When enabled, we store a timestamp when we *send* a key to the
slave. Then, when we commit a frame for rendering to the compositor,
we request presentation feedback. We also store a timestamp for when
the frame was committed.
The 'presented' callback then looks at the input and commit
timestamps, and compares it with the presented timestamp.
The delay is logged at INFO when the delay was less than one frame
interval, at WARN when it was one frame interval, and at ERR when it
was two or more frame intervals.
We also update statistic counters that we log when foot is shut down.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This is used when spawning the slave, to set its current working
directory just before we exec() the client.
In a regular foot instance, we set the cwd from getcwd().
In a foot server instance, each connecting client sends its cwd to the
server, and we use that.
|
| | |
|
| |
|
|
| |
Bind ctrl+shift+return to it
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This adds an optional argument to -s,--server that allows the user to
override the default socket path (XDG_RUNTIME_DIR/foot.sock).
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
TODO: use actual output PPI. Question is *which* output...
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since fonts are destroyed and removed from the font cache when the
last instance is destroyed, closing the "last" terminal window in
server mode would destroy the fonts, and their glyph caches.
By instantiating the set in main, we ensure the fonts, and the glyph
caches, remain. This makes launching new terminals (much) faster.
Note that in "normal" (non-server) mode, this isn't really necessary,
but also doesn't have any penalty.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Since fonts are cached, this adds no additional memory. However, it
makes the first terminal window in --server mode start much faster,
since the (primary) fonts have already been loaded.
Fallback fonts are still loaded on-demand.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
In this mode, foot listens on a UNIX socket and creates terminal
windows when clients connect.
A connecting client sends argc/argv to the server, and the server
instantiates a new terminal window.
When the terminal window is closed, the exit code is sent back to the
client.
|
| | |
|
| |
|
|
| |
main uses this to get the exit code of the terminal.
|
| |
|
|
| |
This allows us to remove that call from the main event loop.
|
| | |
|