Commit graph

1951 commits

Author SHA1 Message Date
Kirill Chibisov ed5dbc1118
Add support for dashed and dotted underlines
This finishes implementation of underline styles provided by
`CSI 4 : [1-5] m` escape sequence.
2022-02-14 19:10:13 +03:00
Kirill Chibisov 774eb03f4f
Clear damage rects right after drawing
Since we could queue damage before we get into the actual rendering
we should clear it after drawing not before.
2022-02-11 02:04:50 +03:00
Kirill Chibisov 933030efd4
Fix terminal not being damage when only font size changed
If font size changes however the cells stay the same the terminal won't
be damaged, since it wasn't resized, however the visual change happened,
thus the entire screen should be damaged.
2022-02-10 23:42:33 +03:00
Kirill Chibisov c35ccaf9b5
Make undercurls thickness close to underlines
Fixes #5873.
2022-02-10 15:29:03 +03:00
Christian Duerr eefce4e9af
Add note about publishing RCs to crates.io
We've been testing out the pre-release feature of crates.io and there
haven't been any major issues. So this updates the documentation to
recommend publishing to crates.io even before the official release.
2022-02-10 11:09:23 +00:00
Christian Duerr d1608dd03e
Add version to info log 2022-02-09 23:41:54 +03:00
Kirill Chibisov 8afeb2c602
Fix warnings when building only with Wayland feature
This commit also makes our CI fail hard when warning encountered when
building only for either Wayland or X11.
2022-02-09 19:25:36 +03:00
Kirill Chibisov 59f16f6b15
Fix alpha when using colors.transparent_background_colors
The alpha is expected to be premultiplied from the text shader, so
we should apply it to the background color.
2022-02-09 17:41:57 +03:00
Kirill Chibisov 73c3dd8628
Add support for drawing undercurls
Fixes #1628.
2022-02-08 20:47:31 +03:00
sckzor 7263d223bf
Add instructions for building without X11/Wayland 2022-02-08 11:43:27 +00:00
Kirill Chibisov c2959f45ec
Fix alacritty_terminal not emitting damage on color change 2022-02-07 22:18:51 +03:00
Thomas Churchman 998250f3c3
Fix renderable_cursor method documentation
This method no longer returns an `Option` since #5773.

Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
2022-02-03 12:04:46 +00:00
Kirill Chibisov d22cd7409c
Fix builtin font block elements going invisible 2022-02-03 03:22:28 +03:00
Christian Duerr 4bf8f375ef
Fix repeated permission requests on M1 macs
This adds a codesign step to our makefile build which should
automatically sign the application and resolve the issues on M1 macs
where Alacritty constantly requests permissions.

Since self-signing does still seem to fix this issue after sharing the
resulting `Alacritty.app` with other M1 macs, the binary produced by our
release build should also be fixed automatically.

Fixes #5840.
2022-02-02 19:23:29 +00:00
Kirill Chibisov 40b5e179a3
Fix terminal damage after leaving Vi mode
This fixes an issue when search results were not damaged when leaving Vi
mode.
2022-02-02 20:20:14 +03:00
Kirill Chibisov 8f1abe13e6
Add damage tracking and reporting to compatible compositors
This allows compositors to only process damaged (that is, updated)
regions of our window buffer, which for larger window sizes (think 4k)
should significantly reduce compositing workload under compositors that
support/honor it, which is good for performance, battery life and lower
latency over remote connections like VNC.

On Wayland, clients are expected to always report correct damage, so
this makes us a good citizen there. It can also aid remote desktop
(waypipe, rdp, vnc, ...) and other types of screencopy by having damage
bubble up correctly.

Fixes #3186.
2022-02-02 00:12:58 +03:00
oxalica d58dff18ef
Clean up and abstract shader creation code
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-01-30 23:57:25 +03:00
Kirill Chibisov 5459492eae
Use cell width to compute builtin font thickness
While using underline thickness could sound logical to draw other
lines most fonts don't make underlines thick compared to cell bounding
box if you increase font size. So instead we're using cell width to
scale builtin font nicely.

This commit also adjusts arcs drawing and alignment.

Fixes #5826.
Fixes #5821.
2022-01-30 15:46:02 +03:00
Kirill Chibisov efae2cc80c
Log used display server on Linux/BSD
This also fixes a bug where the welcome log message wasn't logged.
2022-01-30 06:36:35 +00:00
Kirill Chibisov f6651a997b
Account for font.offset and glyph.offset in built-in font
This commit takes into account `font.offset` and `font.glyph_offset`
when generating built-in font.
2022-01-29 23:06:44 +03:00
zandr 094c2c9269
Add option to control built-in box drawing chars
This commit adds the config `font.builtin_box_drawing` option to
control built-in font, which is enabled by default.
2022-01-29 22:50:44 +03:00
Christian Duerr d1deff9fae
Remove outdated changelog URLs
Alacritty's website (https://alacritty.org) is now advertised publicly
on the GitHub page. Since that includes the old 0.3.0 and 0.5.0
changelogs, it's not necessary to point them out separately anymore.
2022-01-23 14:22:23 +00:00
Christian Duerr 9f6b49ca8f
Fix logfile overwriting existing files 2022-01-22 22:48:44 +00:00
Ömer Sinan Ağacan 4e91e99de3
Fix typo in SizeInfo padding_y rustdoc 2022-01-21 13:45:37 +00:00
Kirill Chibisov 14c22b172f
Reset cursor blinking on ToggleViMode
Fixes #4468.
2022-01-21 12:48:15 +03:00
DaftMouse c4d610d5bf
Fix OSC 104 with empty second parameter
This fixes a bug where using OSC 104 without parameters but
with a trailling semicolon (e.g. '\e]104;\e\\') would not be handled.

Fixes #5542.
2022-01-20 23:57:58 +00:00
DaftMouse 60ef17e8e9
Add ´?´ support to OSC 4 2022-01-15 03:35:05 +00:00
Christian Duerr e38f51c6bd
Remove time dependency
In 7398e9f a regression was introduced which causes Alacritty to crash
on startup since wayland has a keyboard repeat rate thread started
before our logger is initialized.

Since the latest version of time was rather inconvenient to use anyway
and there is no nice solution for this issue other than downgrading the
`time` version again, the time since startup is now logged instead of
the local time.

This should still provide all the relevant information, while getting
rid of an unnecessary dependency. While it would be possible to also
print the delta between log messages, this can be trivially computed so
it has been omitted to skip adding another `Mutex` to the `Logger`
struct.
2022-01-13 08:36:22 +03:00
Christian Duerr 7398e9f8d1
Fix macOS release CI
Since the CI machine is amd64, it is not possible to just execute the
aarch64 binary to test the application. So instead of running `cargo
test`, we just use `cargo build` instead.

Building on the non-release CI instead of just checking also allows us
to make sure linking works properly before a release fails due to it.
2022-01-13 02:23:37 +00:00
James McCoy 1c9fa73165
Update time crate to 0.3.5
Due to unsoundness issues (c.f., time-rs/time#380 and time-rs/time#293),
determining the local timezone can only happen while single-threaded.

Determine the timezone early in startup and apply the offset to the UTC
timestamp before formatting.
2022-01-13 01:53:03 +00:00
Kirill Chibisov fd7573d5d1
Don't blink when cursor is hidden
This prevents unnecessary redraws when the terminal is idle, cursor is
hidden and blinking is enabled.
2022-01-11 23:58:50 +03:00
Kirill Chibisov 01c1cc1278
Use with_position instead of set_outer_position
This uses `with_position` method on a `WindowBuilder` instead of setting
window position on the created window later on.
2022-01-11 20:41:57 +00:00
Kirill Chibisov a8c8c57907
Fix use-after-free when formatting Wayland protocol error 2022-01-11 16:22:30 +03:00
Kirill Chibisov 5e39ea9f9f
Fix block selection expansion with Ctrl + RMB
When 'ExpandSelection' binding was added only default binding for
RightClick was added, however to expand block selection holding control
when doing a click is required, so this commit adds a binding for
'RMB + Control'.
2022-01-11 00:56:49 +03:00
Christian Duerr ed35d033ae
Fix fullwidth char regex search infinite loop
This resolves an issue where the regex search could loop indefinitely
when the end point was defined in a location containing a fullwidth
character, thus skipping over the end before termination.

Fixes #5753.
2022-01-08 20:24:42 +00:00
a5ob7r 5aa8046c7f
Fix last column block selection
This fixes a regression introduced in 8e584099, where block selections
containing the last cell would have the trailing newline stripped and be
joined into one long line on copy.
2022-01-07 09:03:15 +00:00
David 50c7c2b469
Fix macOS IME regression
Fixes 5669.
2022-01-06 03:31:45 +00:00
Kirill Chibisov db83902319
Fix title setting via IPC when dynamic_title is enabled 2022-01-06 02:13:55 +03:00
Kirill Chibisov f7177101ed
Use builtin font for box drawing unicode characters
This commit adds hand rolled drawing of unicode box drawing[1] and
block elements[2] from ranges U+2500 up to U+259f. While using system
font for such characters will look better most of the time, the
characters tend to overlap or not align, so providing builtin font is
the lesser evil here.

[1] - https://www.unicode.org/charts/PDF/U2500.pdf
[2] - https://www.unicode.org/charts/PDF/U2580.pdf

Fixes #5485.
2022-01-06 00:45:06 +03:00
a5ob7r 2057ac243a
Trim \n from hints/semantic-/simple selection
Before this patch a hint regex ending in the last column would append a
newline, despite this newline being "invisible" to the user. To match
the expected behavior, newlines are trimmed from regex hint matches.

To ensure consistency the simple and semantic selection also do not
include a newline at the end of the copied text anymore.

Fixes #5697.
2022-01-04 21:46:20 +00:00
Christian Duerr 437f42f8d3
Migrate from structopt to clap 3 2022-01-04 18:25:26 +00:00
Kirill Chibisov 75c14b9bb8
Update wayland-client to v0.29.3
This should bring support for latest wayland.xml.
It also updates some other dependencies which are used by alacritty.

Fixes #5743.
2022-01-03 22:20:56 +00:00
Kirill Chibisov ce59fa4165
Add title/class CLI parameters to create-window
This adds the ability to pass title and class over IPC via the
create-window subcommand, so users can run only one instance for windows
of different spurposes in the window managers of their choice.
2022-01-03 18:55:22 +00:00
Kirill Chibisov e2b5219eb4
Fix input lag with nvidia driver on Wayland
Fixes #5694.
2021-12-27 23:31:08 +02:00
Christian Duerr f0934d8440
Migrate to 2021 edition 2021-12-26 16:47:57 +00:00
Christian Duerr 850fd1826b
Bump development version to 0.11.0-dev
This is only an update to the development version and does not represent
a stable release.
2021-12-26 15:39:09 +00:00
Christian Duerr e0f8320c39
Fix test failures due to CLI parameters
Fixes #5717.
2021-12-25 19:32:54 +00:00
Christian Duerr 3af1940192
Fix CreateNewWindow CLI fallback
The existing behavior for the new CreateNewWindow actions was to always
pass in their own options, which would discard the existing options
configured on the terminal's PTY config.

To fix this the behavior for CreateNewWindow is now the same as for the
initial window creation, the config values are overwritten conditionally
based on their individual presence in the CLI options.

However all temporary CLI options set on the "master" Alacritty
instance are discarded by all future windows.

Fixes #5659.
2021-12-23 12:23:06 +02:00
Christian Duerr 6d1a63ef28
Remove shared PID/FD variables
The existing PID/FD atomics in alacritty_terminal/src/tty/unix.rs were
shared across all Alacritty windows, causing problem with the new
multiwindow feature.

Instead of sharing these between the different windows, the master FD
and shell PID are now stored on the `window_context`.

Unfortunately this makes spawning new daemons a little more complicated,
having to pass through additional parameters. To ease this a little bit
the helper method `spawn_daemon` has been defined on the
`ActionContext`, making it accessible from most parts of Alacritty's
event loop.

Fixes #5700.
2021-12-19 01:18:42 +03:00
Jorge Carrasco f1802c1cda
Spawn children from foreground working directory
To allow applications spawned by Alacritty to make use of the
shell/foreground process' working directory, it is now set for all new
processes spawned by Alacritty on Unix platforms.

Fixes #5616.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2021-12-18 17:27:10 +00:00