Commit graph

623 commits

Author SHA1 Message Date
Christian Duerr 2f097dac5c Add --option argument to create-window
This patch adds a new CLI parameter to the `create-window` subcommand,
matching the existing `--option` parameter when creating a new Alacritty
instance.

This parameter allows setting up the initial window configuration from
the CLI without having to call `alacritty msg config`, making sure that
all options are set appropriately right from the start.

Closes #6238.
2023-11-11 20:33:06 +01:00
Kirill Chibisov 4a26667060
Use builtin font to draw powerline symbols
In addition to box drawing it was decided to also draw powerline
symbols, since those are quite common and rather simple to draw with
present box drawing infra.
2023-11-11 19:28:19 +04:00
Kirill Chibisov 7ea927ffc1
Fix cursor being hidden after reaching timeout
The timeout and blink events could be delivered at the same time,
so canceling blinking won't work and we'll still have an event.
2023-11-10 21:09:43 +04:00
Christian Duerr 46f8e39880
Fix crash when leaving search after resize
This fixes a crash which could occur when leaving search with a visible
match after shrinking the terminal height to be lower than the original
line the focused match was in.

Closes #7054.
2023-11-03 04:50:45 +00:00
Kirill Chibisov a0663c5225
Add window.blur config option
Fixes #972.
2023-10-29 16:18:33 +04:00
Kyle Willmon 308b331cbc
Avoid maximizing window when creating new tab
This patch ignores the startup mode when creating a new tab on macOS to
avoid maximizing an existing window.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2023-10-27 17:35:11 +00:00
Kirill Chibisov d65357b213
Add version 0.12.3 to CHANGELOG
This is only an update to the development version and does not represent
a stable release.
2023-10-27 00:30:22 +00:00
Pavel Roskin 500b696ca8
Prefer exact matches for bindings in mouse mode
Only consider bindings without Shift if there are no actions defined for the
actual mouse event.

Closes #7292.
2023-10-25 00:04:32 +00:00
Kirill Chibisov 80d4daccc3
Update winit to 0.29.2 and copypasta to 0.10.0
Fixes #7236.
Fixes #7201.
Fixes #7146.
Fixes #6848.
Fixes #3601.
Fixes #3108.
Fixes #2453.
2023-10-21 22:56:20 +04:00
Christian Duerr 845a5d8a8d
Add inline vi mode search
This patch adds inline search to vi mode using `f`/`F` and `t`/`T` as
default bindings. The behavior matches that of vim.

Fixes #7203.
2023-10-20 13:33:38 +04:00
Kirill Chibisov 7ceb638ff8
Fix window.decorations_theme_variant reload
The live reload handling wasn't introduced when the option got added.

Fixes #7295.
2023-10-15 05:37:58 +04:00
Christian Duerr 59c63d3738
Update dependencies
This patch applies all breaking and non-breaking dependency updates
and bumps MSRV to 1.70.0.
2023-10-08 07:29:57 +04:00
Kirill Chibisov 47d500770a
Bump VTE to 0.12.0
Fixes #6845.
2023-09-26 20:48:19 +04:00
Christian Duerr a58fb39b68
Underline hint matches during selection
This patch underlines the full regex hint match while the keyboard hint
selection is in process.

While it would be possible to color the entire match, this would only
introduce unnecessary configuration options and be too noisy. The
underline matches the mouse highlighting and has a less drastic visual
impact.

Closes #6178.
2023-09-22 21:49:52 +04:00
Christian Duerr e35e5ad14f
Fix regex memory usage
This fixes an issue where regexes with a large number of possible states
would consume excessive memory, since the entire DFA was compiled ahead
of time.

To solve this, the DFA is now built at runtime using `regex-automata`'s
hybrid DFA.

There are however still some checks performed ahead of time, causing
errors with obscenely large regexes (`[0-9A-Za-z]{999999999}`), which
shouldn't cause any issues.

A regex which is large, but not large enough to fail the NFA
construction (like `[0-9A-Za-z]{999999}`) will cause a long search of
the entire grid, but will complete and show the match.

Closes #7097.
2023-09-17 13:04:05 +04:00
Rolf Sievert 8eed17227a
Add prefer_egl debug option
Some systems have rendering issues when using GLX rather than EGL. While this is
usually due to a driver bug, it is helpful to provide a workaround for this by
allowing people to prefer EGL over GLX.

This patch adds the new `debug.prefer_egl` option to provide this workaround.

Closes #7056.
2023-09-04 20:15:46 +00:00
Kirill Chibisov 8d174429ee Support startup notify on Wayland/X11
Activate a window to indicate that we want initial focus when the
system uses startup notifications.

Fixes #6931.
2023-09-04 03:01:12 +04:00
Kirill Chibisov bfcebbcd38 Add bindings for macOS tabs
This doesn't represnet the movement to add tabs on any other platform,
unless winit could add a similar API for them.
2023-09-04 03:01:12 +04:00
Kirill Chibisov a189861880 Update winit to 0.29.1-beta
Make use of new winit frame throttling mechanism used in RedrawRequested,
which removes the need for having Wayland queue to ask for the frame
callbacks.

Fixes #7011.
2023-09-04 03:01:12 +04:00
Christian Duerr bbe3174381
Copy global IPC options for new windows
This patch stores all options set for the Window ID `-1` and
automatically applies them to new windows after their creation.

This in theory makes it possible to have a fully dynamic "default
config" without having to reapply it for every new window.

Closes #7128.
2023-08-08 01:14:53 +04:00
Sonu Bardai 35e1bb128b
Apply transparent background colors to "UI" cells 2023-08-07 01:41:38 +00:00
tv 34b3be775d
Ignore scrolling multiplier on touchscreens 2023-08-05 19:08:38 +00:00
Kirill Chibisov 67a433ceed
Skip whitespaces for wide chars in preedit
While we skip the spacers for the wide characters in the grid due to
them having a proper flags, the draw_string method was generating the
cells with incorrect flags leading to wide chars being cut off.
2023-07-22 19:05:12 +00:00
Kirill Chibisov 0c94e4ae7b
Add terminal config section to control OSCs
Some environments demand certain OSC sequences to be disabled or
some escape sequence could require handling which is out of scope
of alacritty, but could be done by external script (OSC 777).

Added section for now just handles the `OSC 52` sequence and changes
its default to be `OnlyCopy`, which is handy for remote copy, but
`Paste` is redundant because normal `Paste` hotkey could be used as
well.

Fixes #3386.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2023-07-22 18:31:35 +00:00
Kirill Chibisov 04ea367e3b
Raise double click threshold to 400ms
This should improve the situation with some touchpads. GTK4 is also
using the same value.
2023-07-13 05:31:26 +00:00
Kirill Chibisov db903503df
Update to the new winit keyboard API
The main highlight of this update is that alacritty will now use new
keyboard API from the winit, which resolves a lot of issues around
key bindings, such as ability to bind dead keys. It also fixes long
standing issues with the virtual key code bindings and make bindings
in general more predictable. It also makes our default Vi key bindings
fully working.

Given that alacritty was using `VirtualKey` directly in the bindings
from the winit, and winit simply removed the enum, we've added internal
conversions to minimize the fallout, but new way to specify the bindings
should be more intuitive.

Other part of this update fixes some forward compatibility bugs with the
Wayland backend, given that wayland-rs 0.30 is fully forward compatible.
The update also fixes weird Maximized startup issues on GNOME Wayland,
however they were present on any sane compositor.

Fixes #6842.
Fixes #6455.
Fixes #6184.
Fixes #5684.
Fixes #3574.
Fixes #3460.
Fixes #1336.
Fixes #892.
Fixes #458.
Fixes #55.
2023-07-11 02:22:14 +00:00
Kirill Chibisov 104ae3665c
Add version 0.12.2 to CHANGELOG
This is only an update to the development version and does not represent
a stable release.
2023-07-01 22:13:24 +04:00
Kirill Chibisov 1a67fc35f0
Change the default colorscheme
The new colorscheme is base16 classic dark with the bright colors
generated with oklab toolkits. The base16 classic dark is less washed
out and represents the current maintainers preference. The motivation
to change it was subjective, though it does look like generic dark
theme.

On a side note, this colorscheme was used for alacritty.org web page for
a long time, however it used different foreground color.
2023-06-29 23:08:18 +04:00
Sonu Bardai df00be25c6
Remove mouse double_click/triple_click options
Fixes #6962.
2023-06-29 17:17:54 +04:00
Pavel Roskin b9c886872d
Add support for loading conpty.dll
Co-Authored-By: @fredizzimo
Co-Authored-By: @grueslayer
2023-06-19 18:29:17 +00:00
Kirill Chibisov ee93824358
Fix the crash when shrinking scrolled terminal
display_offset was adjusted unconditionally, thus it could go
beyound the history limits, so clamp it to history like we do
in grow_colums.

Fixes #6862.
2023-06-17 21:55:12 +00:00
Kirill Chibisov 727531406c
Fix freeze with some drivers when using GLX
Fixes #6972.
2023-06-17 00:58:29 +00:00
Sonu Bardai be03effdbe
Add option to persist hints after selection
Closes #6976.
2023-06-15 00:03:38 +00:00
Christian Duerr bd4906722a
Switch to TOML configuration format
This switches Alacritty's default configuration format from yaml to
toml. While yaml is still supported, it is done by converting it to toml
and should be removed entirely in the future.

All existing features were persisted based on my testing. Behavior
should not change much, though `--option` might have slightly different
behavior since the entire line is not interpreted as one line of toml.

A new `alacritty migrate` subcommand has been added which allows
automatic migration from yaml to toml. This also could be used as a
facility to automatically fix configuration file changes in the future.

Closes #6592.
2023-06-12 00:23:41 +00:00
Kirill Chibisov 4b92388396
Fix crash on ScaleFactorChange on Windows
Windows is known to send zero sizes from winit in Risezed and now
in ScaleFactorChanged events. They were handled in Resized, but
not in ScaleFactorChanged.

Fixes #6949.
2023-06-02 16:11:43 +03:00
Christian Duerr e3746e49a1
Move manpages to scdoc
This rewrites the existing manpages to use the `scdoc` format, making it
simpler to read and edit the manpages without intricate roff knowledge.

Some minor changes to the manpages were made in the process, mostly
focusing on correcting some of the wording. The list of maintainers has
also changed to ensure people not involved in the project anymore aren't
unnecessarily contacted for support.
2023-05-28 10:13:09 +00:00
Kirill Chibisov 32ea98deeb
Fix hyperlink preview for 2 lines terminal (#6953)
The intention was to show it, however it was hidden due to wrong
comparisson check.
2023-05-25 07:52:15 +03:00
Kirill Chibisov f0379f2da7
Add version 0.12.1 to CHANGELOG 2023-05-22 03:06:19 +03:00
Kirill Chibisov 6e7f466c68 Update patch dependencies 2023-05-17 08:36:41 +03:00
Kirill Chibisov 6f6ad2b2ee Update clap to v4.2.7
Fixes #6879.
Fixes #6874.
2023-05-17 08:36:41 +03:00
Kirill Chibisov 0b32cfbb59
Update glutin to 0.30.8 and winit to 0.28.6
Fixes #6920.
Fixes #6824.
2023-05-16 03:03:11 +03:00
Kirill Chibisov 9a5b4850f8
Fix very long startup time on some Wayland systems
This is not a real fix for the issue given that dbus method sctk-adwaita
is using will being called anyway. The proper fix will be available
with the winit's 0.29.0 release.

Right now the delay reduced from around 20 seconds to 100ms on a
systems with broken xdg-desktop-portal setup.
2023-05-07 23:05:23 +03:00
Kirill Chibisov 934d6a2dd7
Bump winit to 0.28.4
Fixes #6817.
2023-05-04 21:17:37 +03:00
Christian Duerr 586f982a26 Allow mode-exclusive bindings in any mode
This patch enables binding chains that go beyond mode changes by
allowing bindings to be defined for modes they do not usually have an
effect in.
2023-04-15 03:09:27 +03:00
Christian Duerr 2df8f860b9
Fix selection rotation on the last line
This fixes an issue with terminal resizes when the selection is on the
last line. Alacritty would fail to rotate lines and keep the selection
in the same line index whenever the terminal line count was grown or
shrunk.

This issue occurred due to the range passed to the selection's rotate
function still being based on the old terminal size, which caused the
initial or target state of the rotation to be outside of the terminal
bounds.

Closes #6698.
2023-03-24 23:07:20 +00:00
Christian Duerr ef8cc5d63f
Bump CHANGELOG development version to 0.13.0-dev
This is only an update to the development version and does not represent
a stable release.

The original bump to 0.13.0-dev was made in 9cf2c89, but did not make
any changes to the changelog. This adds a 0.13.0-dev changelog entry to
master so new changes are properly added to the correct place.
2023-03-22 07:28:18 +03:00
Kirill Chibisov 4b91a1dbe9
Fix ; character in URI OSC 8 payload
The special character `;` can be not URL-encoded, thus it'll add
extra parameter in the payload. Handle it joining extra parameters
with the `;` as a separator.
2023-03-19 18:16:28 +03:00
Kirill Chibisov f5e41d967a
Bump winit to 0.28.2
This also bumps copypasta and sctk-adwaita.

Fixes #6744.
Fixes #6702.
Fixes #6696.
Fixes #2741.
2023-03-05 06:21:04 +00:00
Christian Duerr bf58748055
Send D&D input through paste action
Treating D&D like paste allows using D&D to input text into areas other
than the PTY, like the search bar.
2023-02-27 10:30:39 +03:00
Christian Duerr f01dea8643
Fix bracketed paste with EOT payload
This works around an issue in many (all?) shells where the bracketed
paste logic would only strip out `\r` but interpret EOT (`\x03`) as a
termination of the bracketed paste.
2023-02-23 18:57:18 +00:00