Commit Graph

23 Commits

Author SHA1 Message Date
Kirill Chibisov 40bbdce6de
Fix hyperlinks not being keyboard actionable
This fixes a typo in 694a52b which was filtering all hyperlinks, except
only duplicated ones when opening them with keyboard.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-07-11 22:54:28 +03:00
Kirill Chibisov 673710487a
Extract `SizeInfo` from alacritty_terminal
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.
2022-04-06 13:06:39 +03:00
Christian Duerr 1df7dc5171
Add multi-window support
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.
2021-10-23 07:16:47 +00:00
Christian Duerr 28abb1f9c7
Fix out of order terminal query responses
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.
2021-04-17 23:20:13 +00:00
Christian Duerr cbcc129440
Add copy/paste/select hint actions
This adds some built-in actions for handling hint selections without
having to spawn external applications.

The new actions are `Copy`, `Select` and `Paste`.
2021-04-03 23:52:44 +00:00
Christian Duerr 530de00049
Move renderable cell transformation to alacritty
This refactors a large chunk of the alacritty_terminal API to expose all
data necessary for rendering uniformly through the `renderable_content`
call. This also no longer transforms the cells for rendering by a GUI
but instead just reports the content from a terminal emulation
perspective. The transformation into renderable cells is now done inside
the alacritty crate.

Since the terminal itself only ever needs to know about modified color
RGB values, the configuration for colors was moved to the alacritty UI
code.
2021-01-24 21:45:36 +00:00
Dettorer 2fd2db4afa
Add blinking cursor support
This adds support for blinking the terminal cursor. This can be
controlled either using the configuration file, or using escape
sequences.

The supported control sequences for changing the blinking state are
`CSI Ps SP q` and private mode 12.
2020-11-23 23:11:03 +00:00
Kirill Chibisov 18cf806a27
Remove gui dependencies from alacritty_terminal
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.
2020-07-11 20:03:09 +03:00
Kirill Chibisov 8bd2c13490
Add option to run command on bell
Fixes #1528.
2020-07-10 22:32:44 +03:00
Christian Duerr 87e5b1aa25
Add automatic scrolling during selection
This adds a new `Scheduler` which allows for staging events to be
processed at a later time.

If there is a selection active and the mouse is above or below the
window, the viewport will now scroll torwards the direction of the
mouse. The amount of lines scrolled depends on the distance of the mouse
to the boundaries used for selection scrolling.

To make it possible to scroll while in fullscreen, the selection
scrolling area includes the padding of the window and is at least 5
pixels high in case there is not enough padding present.
2020-06-18 01:02:56 +00:00
Kirill Chibisov 4f5f841296
Remove copypasta dependency from alacritty_terminal 2020-06-07 00:33:20 +03:00
Christian Duerr 81ce93574f
Extend style guideline documentation 2020-05-05 22:50:23 +00:00
Christian Duerr c34ec12c30
Bump glutin to 0.22.0
Fixes #3165.
2020-01-10 01:51:37 +00:00
Christian Duerr 729eef0c93
Update to winit/glutin EventLoop 2.0
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.
2019-10-05 02:29:26 +02:00
John Sullivan ad0365219f Show text cursor when pressing shift in mouse mode
Fixes #2550.
2019-08-24 23:18:50 +00:00
Kirill Chibisov 72dfa477a9 Fix cursor flickering on url hover
This commit fixes the regression introduced in 84aca67 and also fixes url
highlight bounds computation when url ends on a last column.

Fixes #2665.
2019-07-28 17:04:26 +00:00
Christian Duerr 165246f50a
Fix saving of ref tests
Since ref tests were only stored whenever winit requested the window
close, they would not get stored properly when the terminal was closed
through Alacritty using `exit`, Ctrl+D or similar.

This moves the ref test code to the and of the main entry point, which
will always be executed regardless of how the terminal was shutdown.
2019-07-07 14:51:11 +00:00
Christian Duerr e2e25b3206
Fix first unfullscreen on fullscreen mode launched window 2019-06-25 21:32:28 +00:00
Christian Duerr e0a286515f
Add block selection
This implements a block selection mode which can be triggered by holding
Control before starting a selection.

If text is copied using this block selection, newlines will be
automatically added to the end of the lines.

This fixes #526.
2019-06-20 15:56:09 +00:00
Christian Duerr 5d173f6df3
Refactor config parsing files
This is a large refactor of the config parsing structure, attempting to
reduce the size of the file a bit by splitting it up into different
modules with more specific purposes.

This also fixes #2279.
2019-05-10 11:36:16 +00:00
Nathan Lilienthal 34c54e7e0e
Add git hash to version string, and fix crate name (#2397)
This moves `cli` out of `alacritty_terminal` and into `alacritty` where
it belongs, along with the `clap` dependency.
2019-05-03 19:48:25 -04:00
Christian Duerr 9e89aaa477
Switch from copypasta to rust-clipboard
This switches our own `copypasta` crate with the more standardized
`clipboard` library, which allows us to get rid of the `xclip`
dependency on X11.

Additionally, this lays the foundation for native Wayland clipboard
support once the clipboard crate is updated (or a fork is created).

Fixes #5.
2019-04-28 20:21:39 +00:00
Theodore Dubois dbd8538762 Split alacritty into a separate crates
The crate containing the entry point is called alacritty, and the crate
containing everything else is called alacritty_terminal.
2019-04-28 13:24:58 +00:00