Commit graph

2021 commits

Author SHA1 Message Date
Christian Duerr 4ddb608563
Add IPC config subcommand
This patch adds a new mechanism for changing configuration options
without editing the configuration file, by sending options to running
instances through `alacritty msg`.

Each window will load Alacritty's configuration file by default and then
accept IPC messages for config updates using the `alacritty msg config`
subcommand. By default all windows will be updated, individual windows
can be addressed using `alacritty msg config --window-id
"$ALACRITTY_WINDOW_ID"`.

Each option will replace the config's current value and cannot be reset
until Alacritty is restarted or the option is overwritten with a new
value.

Configuration options are passed in the format `field.subfield=value`,
where `value` is interpreted as yaml.

Closes #472.
2022-09-01 01:48:38 +03:00
Kirill Chibisov 18f9c27939
Add inline input method support
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

Fixes #1613.
2022-08-29 16:29:13 +03:00
Kirill Chibisov 791f79a02a
Rework --class CLI option
This commit swaps the order of `general` and `instance` arguments
and also sets `instance` to `general` when only one argument was
provided. This should make this option behave like in other terminals
on X11, since they set either both or general by default, but
not instance like Alacritty.

Fixes #6279.
2022-08-25 05:51:19 +00:00
Christian Duerr 8f88b4d4be
Include extra directory in crate
Instead of having the extra symlink in the root, this puts the symlink
in the alacritty crate. Since we build the package on Linux this is not
a problem and even allows us to get rid of the `alacritty.png` symlink.

To avoid having complicated symlinks with regards to the windows build
assets directory, it has just been removed from the `extra` directory
completely. Since we only need it for building, it doesn't matter where
it's located and users will never have to interact with it manually
anyway.

Closes #6242.
2022-08-24 09:19:30 +00:00
Ulrik de Muelenaere 23915cfc53
Fix general and instance class set on window (#6276)
This fixes a regression introduced in 7d708d5, which caused the general
and instance class to be swapped.
2022-08-20 16:43:02 +00:00
Kirill Chibisov 5549e9eb04
Bump winit to 0.27.2 2022-08-13 10:06:54 +04:00
trimental 376300385b
Use WindowEvent::Occluded to hint rendering
This should prevent rendering on macOS and X11 to invisible
windows.
2022-08-11 13:06:19 +04:00
Kirill Chibisov 7d708d53f7
Bump glutin to 0.29.1
Fixes #6239.
Fixes #5975.
Fixes #5876.
Fixes #5767.
Fixes #4484.
Fixes #3139.
2022-08-10 16:48:46 +04:00
Sabu Siyad 76c5d01ee2
Warn if only columns XOR lines is set
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-08-02 20:43:37 +00:00
Mikayla Maki 1df32309fe
Make grid mutably accessible to libraries
Co-authored-by: Mikayla Maki <mikayla.c.maki@icloud.com>
2022-07-29 06:31:31 +00:00
Peter DeLong f4304d5a30
Fix visible regex match on tall viewports
The end of the search window is currently calculated using the viewport
start instead of the end.  The observed behavior is that all hinting
stops suddenly after line 101.  This was introduced in #6139 when the
code was refactored into this file from display/content.rs.
2022-07-26 12:15:40 +03:00
Chris Copeland 766a3b5582
Fix clippy warnings 2022-07-25 03:04:27 +00:00
Kirill Chibisov b86667b298
Remove redundant dirty updates
In some cases dirty was set without any ui update leading
to extra redraws, this commit resolves this.

Co-authored-by: Greg Depoire--Ferrer <greg@gregdf.com>
2022-07-25 02:17:57 +03:00
Kirill Chibisov 4fce2b16f5
Fix inverted condition for cell's extra clearing
Fixes #6215.
2022-07-24 13:05:46 +03:00
Chris Copeland c3f3bd3666
Register Alacritty shells as tty sessions on macOS
Unless the `shell` config is specified, launch the user's shell with:

```sh
login -flp $USER /bin/sh -c "exec -a -shell /path/to/shell"
```

On macOS, just running a shell prefixed by `-` is not sufficient to be
registered as a login session for things like `w` and `logname`.
However, using the `login` command changes the directory to `$HOME`
before running the program by default, which is not desired. The `-l`
flag disables this behavior, but also skips prepending `-` to the
executed program, so shells will not run as login shells. Instead we
just do this part ourselves with `exec -a`. The result is login shells
that run in the intended directory and are registered as tty sessions.

Fixes #3420.
2022-07-24 02:51:16 +00:00
Mikayla Maki ed4614d0bd
Remove panics from UNIX PTY initialization
Co-authored-by: Mikayla Maki <mikayla.c.maki@icloud.com>
2022-07-20 22:30:55 +00:00
Chris Copeland 48454c0047
Replace map().unwrap_or() with map_or()
Use a `map_or` instead of a `map().unwrap_or()` chain.
2022-07-20 11:24:27 +03:00
Chris Copeland 2a676dfad8
Fix thin strokes on macOS
Remove the `font.use_thin_strokes` config, which only did anything on
macOS and only prior to Big Sur. Instead, we will enable or disable
"font smoothing" on macOS based on the `AppleFontSmoothing` user
default.

These changes let users get the "thin strokes" behavior by setting
`AppleFontSmoothing` to 0 with:

```sh
$ defaults write -g AppleFontSmoothing -int 0
```

(Or replace `-g` with `org.alacritty` to apply this setting only to
Alacritty.app, rather than the whole system.)

Add a `removed` config attribute to show helpful warnings to users
who are using config options that don't do anything anymore, and apply
this attribute to `font.use_thin_strokes`.

Bump `crossfont` to 0.5.0 to pick up the new font smoothing behavior.
This release also includes a fix for a crash when trying to load a
disabled font.

Fixes #4616.
Fixes #6108.
2022-07-15 21:56:26 +00:00
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 e09ff0b4b0
Use org.alacritty instead of io.alacritty
The common naming is reverse DNS, and given that alacritty is using
alacritty.org it makes more sense to use org.alacritty instead of
old io.alacritty.
2022-07-10 23:55:57 +03:00
Kirill Chibisov 694a52bcff
Add support for hyperlink escape sequence
This commit adds support for hyperlink escape sequence
`OSC 8 ; params ; URI ST`. The configuration option responsible for
those is `hints.enabled.hyperlinks`.

Fixes #922.
2022-07-10 20:11:28 +03:00
Ethan Conneely 8451b75689
Fix error when opening in root dir on Windows 2022-07-10 12:10:28 +03:00
5225225 563c4151df
Use DeviceId/WindowId::dummy in tests 2022-07-09 01:37:22 +03:00
Kirill Chibisov ebc6922eaa
Add cursor.blink_timeout config option
This option should prevent extensive power usage due to cursor blinking
when there's no user activity being performed.

Fixes #5992.
2022-07-01 11:40:27 +03:00
Kirill Chibisov 28e3fc7c64
Fix resize on Wayland when creating new window
When we have currently active context when asking EGL on Wayland to
create new context it'll lock the backing buffer of surface using that context.
So making it non-current before-hand to prevent it.

Follow-up to 90552e3.
2022-06-29 22:01:32 +03:00
Sabu Siyad 75b0005619
Add hexadecimal support to --embed
Closes #6145.
2022-06-28 18:22:38 +00:00
a5ob7r 6018590d7b
Bump dirs to 4.0.0
This is to remove dependencies on multiple versions of dirs crate.
2022-06-20 14:19:04 +00:00
Christian Duerr 9236242857
Bump copypasta to 0.8.1
Fixes #6140.
2022-06-18 05:48:14 +00:00
Kirill Chibisov ff63344b7e
Ignore special files for live config reload
When using `--config-file /dev/null` with `live_config_reload`, each
write to `/dev/null` was forcing alacritty to reload its configuration.

This commit makes alacritty ignore special files for live config reload.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-06-16 22:33:47 +00:00
Christian Duerr 4c171e7678
Bump copypasta to 0.8.0
This also applies all non-breaking semver updates.
2022-06-16 18:36:27 +03:00
Christian Duerr 9f02fb9568
Add value hints for clap file paths
This ensures that the generated completions properly suggest file paths
for arguments which accept them.
2022-06-16 18:01:13 +03:00
nils ff7f74fd29
Use MaybeUninit<usize> instead of usize in Storage::swap
`Row` contains pointer bytes, which are not valid for `usize`, therefore
`MaybeUninit<usize>` should be used instead to do an untyped copy.
2022-06-15 20:07:32 +00:00
Ally Tiritoglu d9c6c8d53e
Update SGR escape sequence support 2022-06-10 16:28:48 +00:00
jeremycostanzo fdcf99b0c1
Add vi action to center view around vi cursor 2022-06-10 00:08:18 +03:00
Kirill Chibisov 90552e3e7f
Fix flickering during resize on Wayland
This also fixes an issue of windows not being rendered while resizing.

Fixes #6069.
2022-06-09 16:31:08 +00:00
Vasily Khoruzhick 6dc670cde0
Support dual source blending in GLES2 renderer
GLES2 has GL_EXT_blend_func_extended extension that enables
dual-source blending, so essentially we can reuse fragment shader
from GLSL3 renderer and do 1 rendering pass instead of 3 for the
text.

Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-06-08 12:02:57 +03:00
Kirill Chibisov 29b1ff59e2
Fix old vi cursor not being properly damaged
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-06-07 11:09:03 +03:00
Kirill Chibisov bb7b1201c9
Fix crash when damaging off-screen hint
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-06-06 11:00:39 +03:00
Yuri Astrakhan 56a69c0bfe
Fix a few minor clippy lints 2022-06-02 01:22:50 +00:00
André Kugland e20541a83e
Fix DEC Special Character Set (Line drawing)
This patch resolves some mapping issues with the line drawing character
set where characters like linefeed were incorrectly mapped to their
proper character representation rather than the codepoint of their
identification glpyh.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-06-01 03:33:08 +00:00
Kirill Chibisov 63ef6c9319
Fix Vi cursor not being damaged on scroll
There's no need to damage intermediate Vi mode cursor points, since it
can't change the terminal content meaning that only the previous
and current vi cursor's viewport points matter to damage it properly.
2022-05-26 21:30:33 +00:00
Kirill Chibisov 3bfc4c2808
Don't inherit --command for SpawnNewInstance
Fixes #6060.
2022-05-23 03:35:09 +03:00
a5ob7r c10888b0f0
Fix selection change after leaving vi-mode
This patch fixes that the right point of the selection range moves to
another point when leaves vi-mode with a selection by ToggleViMode.
The cause is that always moves a vi-mode cursor to a search origin
whether or not the current search is active.

This problem is a regression which is introduced by #5945.
2022-05-23 00:01:46 +00:00
Andrés Mejía 394b3ffd81
Fix inaccurate method documentation 2022-05-22 12:12:57 +00:00
Kirill Chibisov 9f8c5c4f56
Enable damage tracking only on Wayland
Other platforms don't have such concepts in general or have them
via different interfaces not related to EGL.

This commit also resolves some minor clippy issues.

Fixes #6051.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-05-20 22:23:55 +03:00
algon e319ca93a6
Fix builtin glyphs for U+2567 and U+2568 2022-05-20 13:08:25 +03:00
Kirill Chibisov 5c51d528ea
Fix gap in builtin box drawing
Builtin box drawing glyphs in range from '\u{2580}' to `\u{2587}`
could have gap due to missing rounding. Previously height was rounded,
however not the `y` offset. This commit fixes it.
2022-05-08 11:24:51 +03:00
a5ob7r ad3ebba532
Remove unnecessary commas in config keybindings 2022-04-29 01:24:35 +00:00
mahkoh 9bbb296d1d
Fix selection copy without button release
To prevent the current selection clipboard from being overwritten right
before pasting, text is no longer copied solely because the user
scrolled the scrollback buffer.

The selection also isn't copied when a mouse button other than LMB/RMB
are released, since these are the only ones capable of modifying the
selection range.

This should prevent issues where the selection of the user gets
unexpectedly overwritten, especially in scenarios where the user is
currently in the process of pasting something into Alacritty.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
2022-04-16 18:39:26 +00:00
kumattau d5cad2a862
Fix cell_height of impl From<SizeInfo<f32>> for WindowSize 2022-04-16 16:39:14 +03:00