Age | Commit message (Collapse) | Author |
|
|
|
|
|
There's no need to force alacritty's user configuration on
other users of the crate, thus provide the options actually used
by alacritty_terminal itself.
|
|
This patch replaces the mio crate with the polling. Now that
smol-rs/polling#96 has been merged, we should be at full feature parity
with mio v0.6 now.
Fixes #7104.
Fixes #6486.
|
|
Co-authored-by: Christian Duerr <contact@christianduerr.com>
|
|
Fixes #6644.
Fixes #6615.
Fixes #6558.
Fixes #6515.
Fixes #3187.
Fixes #62.
|
|
|
|
The `SizeInfo` is a SizeInfo used for rendering, which contains
information about padding, and such, however all the terminal need is
number of visible lines and columns.
|
|
|
|
Fixes #5586.
|
|
Previously Alacritty would always initialize only a single terminal
emulator window feeding into the winit event loop, however some
platforms like macOS expect all windows to be spawned by the same
process and this "daemon-mode" can also come with the advantage of
increased memory efficiency.
The event loop has been restructured to handle all window-specific
events only by the event processing context with the associated window
id. This makes it possible to add new terminal windows at any time using
the WindowContext::new function call.
Some preliminary tests have shown that for empty terminals, this reduces
the cost of additional terminal emulators from ~100M to ~6M. However at
this point the robustness of the daemon against issues with individual
terminals has not been refined, making the reliability of this system
questionable.
New windows can be created either by using the new `CreateNewWindow`
action, or with the `alacritty msg create-window` subcommand. The
subcommand sends a message to an IPC socket which Alacritty listens on,
its location can be found in the `ALACRITTY_SOCKET` environment
variable.
Fixes #607.
|
|
In this change I went through all current rustfmt configuration options
and expanded our existing configuration with overrides whenever deemed
appropriate.
The `normalize_doc_attributes` option is still unstable, but seems to
work without any issues. Even when passing macros like `include_str!`
that is recognized properly and not normalized. So while this wasn't an
issue anywhere in the code, it should make sure it never will be.
When it comes to imports there are two new major additions. The
`imports_granularity` and `group_imports` options. Both mostly just
incorporate unwritten rules that have existed in Alacritty for a long
time. Unfortunately since `alacritty_terminal` imports in `alacritty`
are supposed to be separate blocks, the `group_imports` option cannot be
used.
|
|
`ErrorKind::Other` no longer includes `EIO` since Rust 1.55:
https://blog.rust-lang.org/2021/09/09/Rust-1.55.0.html#stdioerrorkind-variants-updated
It was not precise enough from the very beginning, as the comment says
that only EIO should be hidden, while the code was any uncategorised
errors.
|
|
The patch 9e7655e introduced some changes which improved rendering with
very dense grids, but the automatic benchmarks indicated a slight
performance difference in the `dense_cells` benchmark.
Caching the terminal lock between iterations rather than always calling
`try_lock` resolves that issue.
While breaking early in the `WouldBlock` case with `unprocessed != 0`
does also help resolve these issues, it shows some more significant
fluctuations. Combining both fixes does not help.
Additionally on Windows receiving `Ok(0)` from the PTY will also occur
instead of a `WouldBlock` error, so handling that fixes freezing on
Windows.
Fixes #5305.
|
|
Before this patch, Alacritty's PTY reader would always try to read the
PTY into a buffer and then wait for the acquisition of the terminal lock
to process this data. Since locking for the terminal could take some
time, the PTY could fill up with the thread idling while doing so.
As a solution, this patch keeps reading to a buffer while the terminal
is locked in the renderer and starts processing all buffered data as
soon as the lock is released.
This has halfed the runtime of a simple `cat` benchmark from ~9 to ~4
seconds when the font size is set to `1`. Running this patch with
"normal" grid densities does not appear to make any significant
performance differences in either direction.
One possible memory optimization for the future would be to use this
buffer for synchronized updates, but since this currently uses a dynamic
buffer and would be a bit more cluttered, it has not been implemented in
this patch.
|
|
This forces all responses made to the PTY through the indirection of the
UI event loop, making sure that the writes to the PTY are in the same
order as the original requests.
This just delays all escape sequences by forcing them through the event
loop, ideally all responses which are not asynchronous (like a clipboard
read) would be made immediately. However since some escapes require
feedback from the UI to mutable structures like the config (e.g. color
query escapes), this would require additional locking.
Fixes #4872.
|
|
This adds some built-in actions for handling hint selections without
having to spawn external applications.
The new actions are `Copy`, `Select` and `Paste`.
|
|
This implements support for temporarily freezing the terminal grid to
prevent rendering of incomplete frames.
This can be triggered using the escapes `DCS = 1 s` (start) and
`DCS = 2 s` (end).
The synchronization is implemented by forwarding all received PTY bytes
to a 2 MiB buffer. This should allow updating the entire grid even if it
is fairly dense. Unfortunately this also means that another branch is
necessary in Alacritty's parser which does have a slight performance
impact.
In a previous version the freezing was implemented by caching the
renderable grid state whenever a synchronized update is started. While
this strategy makes it possible to implement this without any
performance impact without synchronized updates, a significant
performance overhead is introduced whenever a synchronized update is
started. Since this can happen thousands of times per frame, it is not a
feasible solution.
While it would be possible to render at most one synchronized update per
frame, it is possible that another synchronized update comes in at any
time and stays active for an extended period. As a result the state
visible before the long synchronization would be the first received
update per frame, not the last, which could lead to the user missing
important information during the long freezing interval.
Fixes #598.
|
|
This introduces some duplicate dependencies, though they are necessary
to build properly without any warnings.
Fixes #4735.
|
|
This replaces the existing `Deserialize` derive from serde with a
`ConfigDeserialize` derive. The goal of this new proc macro is to allow
a more error-friendly deserialization for the Alacritty configuration
file without having to manage a lot of boilerplate code inside the
configuration modules.
The first part of the derive macro is for struct deserialization. This
takes structs which have `Default` implemented and will only replace
fields which can be successfully deserialized. Otherwise the `log` crate
is used for printing errors. Since this deserialization takes the
default value from the struct instead of the value, it removes the
necessity for creating new types just to implement `Default` on them for
deserialization.
Additionally, the struct deserialization also checks for `Option` values
and makes sure that explicitly specifying `none` as text literal is
allowed for all options.
The other part of the derive macro is responsible for deserializing
enums. While only enums with Unit variants are supported, it will
automatically implement a deserializer for these enums which accepts any
form of capitalization.
Since this custom derive prevents us from using serde's attributes on
fields, some of the attributes have been reimplemented for
`ConfigDeserialize`. These include `#[config(flatten)]`,
`#[config(skip)]` and `#[config(alias = "alias)]`. The flatten attribute
is currently limited to at most one per struct.
Additionally the `#[config(deprecated = "optional message")]` attribute
allows easily defining uniform deprecation messages for fields on
structs.
|
|
Fixes #4189.
|
|
|
|
This commit removes font dependency from alacritty_terminal,
so it'll simplify the usage of alacritty_terminal as a library,
since you won't link to system's libraries anymore. It also
moves many alacritty related config options from it.
Fixes #3393.
|
|
Fixes #1528.
|
|
Keeping the license as part of every file bloats up the files
unnecessarily and introduces an additional overhead to the creation of
new modules.
Since cargo already provides excellent dependency management, most of
the code-reuse of Alacritty should occur through Rust's dependency
management instead of copying it source.
If code is copied partially, copying the license from the main license
file should be just as easy as copying from the top of the file and
making some adjustments based on where it is used is likely necessary
anyways.
|
|
|
|
This allows us to clean up the Arcs on windows, as well as tidy up
the code on unix a little too.
Fixes #3086.
|
|
Fixes #2889.
|
|
This implements --hold flag which keeps Alacritty open after
its child process exits.
Fixes #1165.
|
|
This takes the latest glutin master to port Alacritty to the EventLoop
2.0 rework.
This changes a big part of the event loop handling by pushing the event
loop in a separate thread from the renderer and running both in
parallel.
Fixes #2796.
Fixes #2694.
Fixes #2643.
Fixes #2625.
Fixes #2618.
Fixes #2601.
Fixes #2564.
Fixes #2456.
Fixes #2438.
Fixes #2334.
Fixes #2254.
Fixes #2217.
Fixes #1789.
Fixes #1750.
Fixes #1125.
|
|
|
|
The crate containing the entry point is called alacritty, and the crate
containing everything else is called alacritty_terminal.
|