| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSC 4/104 changes the 256-color palette. We also run a pass over the
visible cells, and update their colors.
This was previously done by comparing the actual color of the cell,
with the “old” color in the palette. If they matched, the cell was
updated.
This meant that cells with an RGB color (i.e. not a palette based
color) was also updated, _if_ its color matched the palette color.
Now that each cell tracks its color *source*, we can ignore all
non-palette based cells.
Note that this still isn’t perfect: if the palette contains multiple
entries with the same color, we’ll end up updating the “wrong” cells.
Closes #678
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 empty literals in the macro are to ensure the argument itself
is a string literal, so it can't be used on anything else.
|
| |/
|
|
|
|
|
|
|
| |
This matches the documented (and observed) behavior in xterm:
> XTerm accepts either BEL or ST for terminating OSC sequences, and
> when returning information, uses the same terminator used in a query
-- https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
|
| | |
|
| | |
|
| |
|
|
|
| |
And of course, we also implement the corresponding reset sequences,
OSC 117+119.
|
| | |
|
| |
|
|
|
|
| |
When using the urxvt extension of the XParseColor format, the alpha
component is not a floating point number, but a decimal number in the
range 0-100.
|
| | |
|
| |
|
|
|
|
|
| |
There are two variants, either using a ‘[percent]’ prefix for legacy
colors, or using ‘rgba:r/g/b/a’ instead of ‘rgb:r/g/b’.
Closes #436
|
| |
|
|
| |
Access the original colors in the configuration instead.
|
| |
|
|
| |
Closes #434
|
| |
|
|
|
|
|
| |
Doing so means the next OSC-8 URL emitted by the client application,
with the same ID, will get a *new* id internally.
Instead, hash the string and use that as ID.
|
| |
|
|
|
| |
The current OSC-8 URL’s ID is now tracked along with the URI itself,
and its starting point.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applications can assign an ID to the URL. This is used to associate
the parts of a split up URL with each other:
╔═ file1 ════╗
║ ╔═ file2 ═══╗
║http://exa║Lorem ipsum║
║le.com ║ dolor sit ║
║ ║amet, conse║
╚══════════║ctetur adip║
╚═══════════╝
In the example above, ‘http://exa’ and ‘le.com’ are part of the same
URL, but by necessity split up into two OSC-8 URLs.
If the application sets the same ID for those two OSC-8 URLs, the
terminal can ensure they are handled as one.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSC 777 is URxvt’s generic escape to send commands to its perl
extensions. The first parameter is the name of the extension, followed
by its arguments.
OSC 777;notify is a, if not well established, at least a fairly well
known escape sequence to request a (desktop) notification. The syntax
is:
\e]777;notify;<title>;<body>\e\\
Neither title nor body is escaped in any way, meaning they should not
contain a ‘;’.
Foot will split title from body at the *first* ‘;’. Any remaining ‘;’
characters are treated as part of ‘body’.
Instead of adding built-in support for the freedesktop notification
specification (which would require us to link against at least dbus),
add a new config option to foot.ini: ‘notify’.
This option specifies the command to execute when a notification is
received. ‘${title}’ and ‘${body}’ can be used anywhere, in any
combination, and as many times as you want, in any of the command
arguments.
The default value is ‘notify-send -a foot -i foot ${title} ${body}’
|
| |
|
|
| |
Use the config directly instead.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doing so will schedule the renderer “as soon as possible”. I.e we’re
by-passing the regular scheduler, and thus we’re by-passing the user’s
setting of the delayed-render-* timers.
The fact that we’re scheduling “as soon as possible” also means we’re
much more likely to trigger flickering, or color flashes, if the
application is changing colors which are on the screen.
To handle changes to the cursor color(s), use the new
term_damage_cursor() instead of render_refresh().
To handle background color changes, which affect the margins, use the
new term_damage_margins() instead of render_refresh_margins(),
Closes #141
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
We only updated the grid for OSC 4 - Set color <idx>. But we did *not*
do it for 104 (reset color <idx>), 10 - set default foreground, 11 -
set default background, 110 - reset default foreground, or 111 - reset
default background.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Compiles and runs, but mouse, clipboard and other things have been
disabled.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since we don't have the original palette index in already rendered
cells, we compare the color *value*. If it matches, we assume this was
the color index used, and updates the cell's color.
Note that for performance reasons, we only update the current
grid. This is of course wrong, strictly speaking.
However, it is expected that _Set Color_ is used by full-screen
applications using the alternate grid.
|
| |
|
|
|
| |
This fixes a crash (in debug builds) that could be triggered by
e.g. cat:ing /dev/urandom.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
OSC 7 updates the terminal's view of the current working
directory. The format is OSC 7;URI ST
We decode the URI and updates the term structs 'cwd' member.
This is then used when spawning a new terminal instance.
|
| | |
|
| |
|
|
| |
I haven't decided if I want to support this
|
| |
|
|
|
|
|
|
| |
Having them as error messages was nice when we where still missing
lots of sequences.
Now we don't anymore, and these just spam stdout as well as syslog
when e.g. cat:ing binary data.
|
| | |
|
| |
|
|
|
|
| |
'p' means 'primary', while 's' means 'selection'. Thus, a client can
now request 'selection' clipboard data and will receive it from the
primary selection.
|
| |
|
|
|
|
|
|
| |
This callback is *always* called, including when there has been an
error.
This is in preparation for making text_from_{clipboard,primary}
asynchronous.
|
| | |
|
| |
|
|
|
|
| |
We do however need access to it, so provide a pointer. The difference
is that now we can have a *single* wayland instance, but multiple
terminal instances.
|
| |
|
|
|
| |
Instead of passing the terminal to the wayland callbacks, pass a
'struct wayland' pointer.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
That is, remove the 'regular' and 'bright' color arrays. This is
possible since the 256-color array is defined such that the first 16
colors map to the regular and bright colors.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This implements OSC 4, 10, 11 - change <color>/foreground/background,
and their corresponding 'query' variant (which was already implemented
for OSC 10/11).
It also implements OSC 104, 110, 111 - reset
<color>/foreground/background.
Set corresponding terminfo entries to signal this support to clients.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When responding to a OSC 52 clipboard request, we need to base64
encode the clipboard data.
This is done in, potentially, several calls. Since we need at least 3
bytes to be able to produce any base64 output, we may have to buffer
up to 2 bytes between the callback calls with clipboard data.
This was being done incorrectly, where both bytes were written to
index 0 in the buffer.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Replace with generic error log messages that simply says the
ESC/CSI/OSC sequence is unhandled. This can mean either invalid or
unimplemented, depending on the context.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The format we used previously was a discouraged and obsolete
format (and incorrect too).
|
| | |
|
| |
|
|
|
| |
This is the preferred terminator anyway, and at least Emacs likes it a
whole lot better.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* action() returns void - this gets rid of checks in vt_from_slave()
* split up ACTION_PRINT into ACTION_PRINT (ASCII) and ACTION_UTF8_PRINT
ACTION_PRINT is on the hot path, and we want it streamlined.
* Remove run-time checkout for unimplemented state transitions, as we
shouldn't have any of those left.
* Don't re-load current VT state on each iteration in vt_from_slave()
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|