Age | Commit message (Collapse) | Author |
|
|
|
Unwrapping inside the config file parsing can lead to some issues that
prevent us from falling back to a default configuration file.
One instance of that issue was mentioned in #1135.
Now all instances of `unwrap()` have been removed and replaced with
proper error handling. This will make the config more robust and
prevents live reload from silently breaking while alacritty is running.
This also fixes a few currently existing clippy issues.
Clippy added an additonal lint which complains about `MyStruct { field:
field }`.
These issues have been fixed, except for some false-positives and issues
in external macros which will probably be fixed with future updates (rust-lang-nursery/bitflags#149)
|
|
This commit adds clippy as a required step of the build process. To make
this possible, all existing clippy issues have been resolved.
|
|
Until now alacritty completely refuses to start when the config is broken
in any way. This behavior has been changed so the worst-case is always
that alacritty launches with the default configuration.
When part of the config is broken, alacritty shouldn't instantly try to
recover to the default config, but instead try to use defaults only for
the parts of the config which are broken. This has also been implemented
for most of the fields in the configuration. So it should be possible that
parts are broken, but the rest is still used for the configuration.
This fixes #954.
|
|
This replaces the `font_size_modifier` stored on the `Term` struct with a `font_size` field.
With this change it is not necessary anymore to calculate the new font size from a delta but the current font size is always stored directly on the `Term` struct.
As a result of this it is now possible to increase the font size by more than 127 steps at runtime. It also limits the minimum font size to 1, so issues with the `font_size_modifier` dropping far below font size 1 are resolved with this change.
This fixes #955.
|
|
It is now possible to configure the amount of lines
scrolled with faux scrollback.
|
|
Some people have complained about the behavior of faux scrollback inside
of vim/tmux, however from what I can tell, alacritty behaves the same
way as other terminal emulators that support faux scrollback.
However there are a lot of terminal emulators that do not support faux
scrollback at all, which leads to people complaining about unusual
scroll behavior.
This is my proposal on how to solve this issue, by giving people that do
not like the VTE-Style faux scrolling the option to opt-out.
|
|
This logic is applied in Term's ansi::Handler implementation
to avoid unnecessary allocations.
|
|
|
|
|
|
|
|
|
|
Move/rename borderless into window_config as decorations
|
|
Until winit gives us more capabilities in regard to window decorations
this implements a simple switch that renders the window without any
title bar or border
|
|
The default cursor can now be configured through the cursor_style field
of the config. Valid options include Block, Underline, and Beam.
The default can be restored by sending \e[0q as in VTE terminals.
Live config reloading is supported for this parameter.
|
|
|
|
(const_static_lifetime).
|
|
Fixes #882
|
|
|
|
|
|
|
|
Since landing the patch adding transparency support to Alacritty,
there's been an issue where othewise solid background cells were also
being rendered partially transparent. Now, all filled background cells
are rendered fully opaque.
Some logic was added to support discarding filled backgrounds which had
the same color as the default background. This means that, if the
default background is #000 and a cell has that background, it will never
be rendered opaque. This may not be correct.
Note that many truecolor vim color schemes print spaces for default
colored background cells. Performance can be dramatically improved by
using ctermbg=NONE guibg=NONE to skip rendering those cells.
|
|
|
|
Must have been broken when upgrading notify-rs
|
|
This shouldn't have any effect, but at least the default value is now
consistent with the default deserialization value.
|
|
Adds support for font resizing at run-time. Three new actions are
introduced:
* IncreaseFontSize - Increases current font size by 1.0
* DecreaseFontSize - Decreases current font size by 1.0
* ResetFontSize - Resets font size to that specified in the
configuration.
The stock config files have example configuration for each which should
match gnome-terminal. For convenience, the config entries are:
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: IncreaseFontSize }
- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
|
|
|
Rather than use DPI from config, use device-pixel-ratio from winit. This
is computed using the display DPI anyhow, so it should have the same
effect.
|
|
Because there are so many clippy warnings in the current codebase,
this commit removes '#![cfg_attr(feature = "clippy", deny(clippy))]',
to make it easier to fix warnings incrementally.
|
|
|
|
500ms introduced a visual lag between file save and display update.
|
|
|
|
|
|
This will keep the original behavior for users who don't update their
config.
|
|
Provide a command line option as well as a configuration file option.
The command line option takes precedence.
|
|
The option is an Alpha struct that ensures that the contained float is
between 0.0 and 1.0. Background colors are multiplied by the opacity
to properly alpha blend them.
|
|
* Update to latest Glutin/winit
This *finally* gets us off the fork of Glutin we've been on for so long
and will unblock a number of other items. Functionality should be the
same as before.
The update forced our hand on a compiler update. It's no longer
feasible to pin on an old version. From now on, we require latest
stable.
|
|
This should resolve an issue where config behind a symlink was not being
properly reloaded when edited.
|
|
Add support for the VTE 'dim' flag, with additional support for
custom-themed dim colors. If no color is specified in the config, it
will default to 2/3 the previous (not a spec, but the value other
terminals seem to use).
The actual dimming behavior brings bright colors to normal and regular
colors to the new dim ones. Custom RGB values are not changed, nor are
non-named indexed colors.
|
|
* Parse cli arguments before configuration file
Parsing the cli arguments before the configuration file allows `--help`
and `--version` to be used even if the configuration file is broken.
* Add configuration file to command line arguments
This commit adds a new command line flag `--config-file` to override the default
configuration file location. If the specified file is unavailable,
Alacritty will quit instead of generating a fallback. If the specified
file is invalid, i.e. /dev/null, the compiled in defaults will be loaded
instead.
|
|
Based on option `command` in key binding section in config, e.g.
- { key: N, mods: Control|Shift, command: alacritty }
# or
- {
key: N,
mods: Control|Shift,
command: {
program: "alacritty",
args: ["-e", "vttest"],
}}
specified command will be run in the background on key press. Alacritty
doesn't wait for its result nor block IO.
|
|
Padding can be configured by using the `padding` field in the config
file, like so:
padding:
x: 2
y: 2
which would result in a 2px padding within each side of the window.
|
|
The two structs are very similar, so there is no reason for them to be
separate. Instead combine them into a single Delta struct, which can be
used to shift a point in a two dimensional plane.
|
|
Add the ability to move glyphs within their cells on a global basis via
an option in the configuration file.
|
|
The font metrics function was using freetype metrics in an ineffective
way, improve the use of those metrics and remove the now unnecessary
separate default values for font offset in linux.
|
|
This changes the cursor color config to use the `text` and `cursor`
properties instead of the current `foreground` and `background`
properties. The latter names stop making sense when dealing with cursors
like a vertical bar or underscore. In the new system, the block,
underscore, or vertical bar would always take the color of `cursor`, and
the text would take the color of `text` when using a block, or keep its
normal color when using the underscore or vertical bar.
A warning is now emitted on startup when the old form of cursor color
config is used. This will be a hard error in the future.
|
|
|
|
|
|
The color list needs to be updated by the parser, and this isn't
possible if it's on the config. This change makes sense semantically as
well since it's really part of the terminal state.
This is in preparation for OSC color parsing.
|
|
Much nicer error message than with Debug.
|