| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| | |
|
| |\ |
|
| | |\
| | |
| | |
| | |
| | | |
Closes #801
Closes #804
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This reverts commit bb967fd2f927d90e881ed2b05db1fa6946033580.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The old algorithm always created a new URI, followed by (maybe)
removing the existing URI, when an URI needed to be modified.
That is, if e.g. the tail of an URI was being erased, the old
algorithm would create a new URI for the part of the URI that should
remain, and then removed the old URI.
This isn’t very effective. The new algorithm instead identifies all
possible overlap cases, and handles each one differently:
* URI ends *before* erase range starts - continue with the next URI
without further checks
* URI starts *after* the erase range ends - return, we’re done
* Erase range erases the entire URI - remove the URI
* Erase range erases a part in the middle - split the URI
* Erase range erases the head of the URI - adjust the URI’s start
* Erase range erases the tail of the URI - adjust the URI’s end
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
This function handles erasing of an URI range. That is, a range of the
row is being either erased, or overwritten (from the URI perspective,
these two are the same thing).
We handle both partial overwrites (split up, or truncate URI), as well
as complete overwrites (remove URI).
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of passing raw char** pointers to argv_compare(), pass
pointers to ‘struct argv’.
This lets argv_compare() handle both argv’s being NULL, or one of them
being NULL. That is, the caller no longer needs to check that both
argv’s are non-NULL before calling argv_compare().
Furthermore, update has_key_binding_collisions() to require the pipe
argv to match, in addition to matching the ‘action’, when allowing a
key collision.
|
| | |
| |
| |
| |
| |
| | |
When parsing a key binding with a pipe-argv, we failed to free the
argv vector (or to be precise, the strdup:ed entries in the array)
when failing to parse the remainder of the binding.
|
| | |\
| | |
| | |
| | | |
Closes #809
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
pipe_argv_from_value itself stripped the cmd-to-exec from ctx->value,
so the callers should not be doing that themselves.
Fixes #809
|
| | |\ \ |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Every branch of these long if/else if/else chains returns, so the
compiler can figure out on its own that the last line is never reached.
If, for some reason, one of the branches does not return (as was the
case after 205f1f7, fixed by b22322b), this would usually result in a compiler
error ("control reaches end of non-void function"), but adding UNREACHABLE
transforms this into silent undefined behaviour.
|
| | |\ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
- Changes in PaperColor Themes
|
| | | |/ /
| | | |
| | | |
| | | | |
- color palettes taken from https://github.com/NLKNguyen/papercolor-theme
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The parsing context keeps a pointer to the current section name. This
is used when logging errors.
However, the pointer was into a buffer allocated by getline(). This
buffer are often re-used in the next call to getline(), or free:d.
Regardless, the section name pointer is invalid after the next call to
getline(), which meant all error messages were logging a correct
section name.
|
| | |\ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Each cell now tracks it’s current color source:
* default fg/bg
* base16 fg/bg (maps to *both* the regular and bright colors)
* base256 fg/bg
* RGB
Note that we don’t have enough bits to separate the regular from the
bright colors. These _shouldn’t_ be the same, so we ought to be
fine...
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The maximum size required for the string buffer is relatively small,
known at compile-time and not likely to ever grow beyond 512 bytes.
Therefore we may as well just use the stack.
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This could be triggered by running, for example:
foot -o tweak.render-timer=invalid
For some reason LeakSanitizer was only detecting this leak when the
option value was invalid, even though it was occuring in either case.
|
| | | | |
|
| | |/ |
|
| | |\ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
The missing return caused us to fall through to the bottom of the
function, where we ended with an error message:
[main].letter-spacing: 0: not a valid option: letter-spacing
Closes #795
|
| | |\ |
|
| | |/ |
|
| | |
| |
| |
| |
| |
| |
| | |
This adds a new meson option that controls whether the example theme
files should be installed or not. The default is true.
Previously, themes were gated by the -Ddocs option.
|
| | | |
|
| | |\
| |/
|/| |
|
| | | |
|
| |/ |
|
| |\ |
|
| |/
|
|
|
|
|
| |
* Rename user_notification_add() to user_notification_add_fmt()
* Add new user_notification_add() helper function
* Use xvasprintf() to replace user_notification_add_va()
* Make better use of helper functions in config.c
|
| |
|
|
|
|
|
| |
* [main].bell
* [main].jump-label-letters
* [main].url-launch
* [main].osc8-underline
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a custom version of solarized-dark, where the bright colors
have been generated by increasing the regular colors’ luminance by
20%.
In other words, this version does *not* have the solarized colors that
normally occupy the bright colors. Thus, if you want the full
solarized experience in e.g. editors, make sure to use editor-specific
24-bit themes.
|
| |\
| |
| |
| | |
Closes #776
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows you to configure custom colors to be used when colors are
being dimmed (`\E[2m`).
It is implemented by color matching (just like
bold-text-in-bright=palette-based); the color-to-be-dimmed is matched
against the current color palette.
If it matches one of the regular colors (colors 0-7), the
corresponding “dim” color will be used.
If it matches one of the bright colors (colors 8-15), the
corresponding “regular” color will be used (but *only* if the “dim”
color has been set).
Otherwise, the color is dimmed by reducing its luminance.
The default behavior, i.e. when dim0-7 hasn’t been configured, is to
dim by reducing luminance for *all* colors. I.e. we don’t do any color
matching at all. In particular, this means that dimming a bright color
will *not* result in the corresponding “regular” color.
Closes #776
|
| | |
|
| | |
|
| |\ |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to modifyOtherKeys=1 (foot’s default, and only, mode), except
that:
* All modifiers (and not just Ctrl) generate \E[27;m;n~ escapes
* Regular keys (with modifiers) also generate \E[27;m;n~ escapes (for
example, C-h no longer generates ^H, but \E[27;5;104~)
For our keymap based lookups, this is handled by adding
MOD_MODIFY_OTHER_KEYS_STATE<N> variants.
For “generic” keys, we simply adjust the conditions for when to emit a
\E[27;m;n~ escape - the only requirement is that at least one modifier
is active.
|
| |\
| |
| |
| | |
Closes #787
|
| |/
|
|
| |
Closes #787
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
../../foot/config.c:154:50: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
log_msg(log_class, LOG_MODULE, file, lineno, formatted_msg);
^~~~~~~~~~~~~
../../foot/config.c:154:50: note: treat the string as an argument to avoid this
log_msg(log_class, LOG_MODULE, file, lineno, formatted_msg)
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Result is set through a pointer passed as an argument. Note that we
assume enums are 32-bit, and explicitly cast them to int*.
Static asserts have been added to ensure this invariant holds.
|
| | |
| |
| |
| | |
Add UNREACHABLE() at the bottom
|
| | | |
|
| | |
| |
| |
| |
| | |
This allows us to pass the final pointer directly to the conversion
functions, as well as allowing us to print outside-range errors.
|
| | |
| |
| |
| | |
Takes a pointer to a char*, free:s it, and strdups the current value.
|
| | |
| |
| |
| |
| | |
Write boolean value to a pointer passed as argument, return conversion
success/failure
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
These work like LOG_AND_NOTIFY_* but add contextual information: path
of the conf file, line number, section name, key/option name and the
value.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
* str_to_double() -> value_to_double()
* str_to_pt_or_px() -> value_to_pt_or_px()
|
| | |
| |
| |
| |
| |
| | |
* str_to_ulong() -> value_to_ulong()
* str_to_color() -> value_to_color()
* str_to_two_colors() -> value_to_two_colors()
|
| | | |
|
| | |
| |
| |
| | |
Change argument to a ‘struct context’ pointer
|
| |/ |
|
| |
|
|
|
|
|
|
|
| |
There's no need to call setlocale() twice, since the first call
returns the same value as the second.
We also handle a NULL return value explicitly and show a distinct
error message for that case, since it typically indicates a
misconfigured locale and not just a non-UTF8 locale.
|
| |
|
|
| |
Fixes compilation on systems with “too old” wayland-protocols
|
| |
|
|
|
| |
The bundled PKGBUILD has been pretty much identical to the one in the
AUR package “foot-git” for a long time now.
|
| | |
|
| |\
| |
| |
| | |
Closes #779
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
If there aren’t any seats available, input is not possible (neither
keyboard nor mouse input).
Note that this is not the same thing as e.g. no keyboard being plugged
in. In this case, there will be a seat, but without the keybaord
capability. Input may not be possible _right now_, but may be later,
if the user plugs in a keyboard.
Closes #779
|
| |\ |
|
| |/
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
path:lineno: [section].key: value: message desribing what’s wrong with value
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
MSG_NOSIGNAL Requests not to send the SIGPIPE signal if an attempt
to send is made on a stream-oriented socket that is
no longer connected. The [EPIPE] error shall still be
returned.
|
| |/ |
|
| |\ |
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we’re using CSDs, we’ve up until now rendered a 5px invisible
border. This border handles interactive resizing. I.e. hovering it
changes the mouse cursor, and mouse button events are used to start an
interactive resize.
This patch makes it possible to color part of (or the entire) border,
with a configurable color.
To facilitate this, two new options have been added:
* csd.border-width
* csd.border-color
border-width defaults to 0, resulting in the look we’re used to.
border-color defaults to the title bar color. If the title bar color
hasn’t been set, it defaults to the default foreground color (just
like the title bar color does).
This means that, setting border-width but not border-color, results in
a border that blends with the title bar.
|