aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
AgeCommit message (Collapse)Author
2018-03-07Make number of scrollback lines configurableJoe Wilm
2018-03-04Remove all instances of unwrap() from configChristian Duerr
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)
2018-01-06Add clippy check to travisChristian Duerr
This commit adds clippy as a required step of the build process. To make this possible, all existing clippy issues have been resolved.
2018-01-06Improve ability of alacritty to deal with broken configChristian Duerr
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.
2018-01-05Prevent font_size_modifier from sinking too low (#994)Christian Duerr
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.
2018-01-02Allow faux scroll amount configurationChristian Dürr
It is now possible to configure the amount of lines scrolled with faux scrollback.
2018-01-02Add config option for faux scrollbackChristian Dürr
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.
2017-12-24Adding dynamic_title property to configuration (#819)Wesley Gahr
This logic is applied in Term's ansi::Handler implementation to avoid unnecessary allocations.
2017-12-23Update bitflags to v1Chet Gurevitch
2017-12-22Use consistent config deprecation message styleJoe Wilm
2017-12-22Deprecate config top-level dimensions and paddingJoe Wilm
2017-12-22Move dimensions and padding into window sectionRobert Günzler
2017-12-22Add new window section to configRobert Günzler
Move/rename borderless into window_config as decorations
2017-12-22Add 'borderless' optionRobert Günzler
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
2017-12-03Add cursor style option (#928)Christian Duerr
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.
2017-12-03clippy: use is_empty() instead of len() == 0 (warn(len_zero)).Matthias Krüger
2017-12-03clippy: string constants do not need to have static lifetime ↵Matthias Krüger
(const_static_lifetime).
2017-11-11Support integer font size in config (#886)thelearnerofcode
Fixes #882
2017-10-30fix some typos in commentsMartin Lindhe
2017-10-22Fix typoJoe Wilm
2017-10-22Rewrite err_println to eprintln introduced in Rust 1.19 (#799)Roel
2017-10-21Fix solid background color opacity (#847)Joe Wilm
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.
2017-10-21List all valid actions in config error message (#848)Robert Bittle
2017-10-16Fix config reloadingJoe Wilm
Must have been broken when upgrading notify-rs
2017-10-16Fix default config reload valueJoe Wilm
This shouldn't have any effect, but at least the default value is now consistent with the default deserialization value.
2017-10-14Implement user actions for font resize (#625)Dan Aloni
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 }
2017-10-09Support web notation for hex colorsRobert Günzler
2017-10-08Scale all fonts based on device-pixel-ratioJoe Wilm
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.
2017-09-27Use clippy = "*", update, and fix some warnings (#796)Aaron Hill
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.
2017-09-05Comment about duration arg to file watcherJoe Wilm
2017-09-05Reduce file watcher debounce periodJoe Wilm
500ms introduced a visual lag between file save and display update.
2017-09-05Update notifyJonathan Schleußer
2017-09-05Update servoJonathan Schleußer
2017-08-29Default to enabling live config reloadJoe Wilm
This will keep the original behavior for users who don't update their config.
2017-08-29Implement options to not start the config_monitor thread (#689)Liu Wei
Provide a command line option as well as a configuration file option. The command line option takes precedence.
2017-08-20Add background_opacity option to set terminal transparency (#331)Gabriel Martinez
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.
2017-07-20Update to latest Glutin/winit (#671)Joe Wilm
* 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.
2017-07-19Canonicalize the config watching path (#672)Joe Wilm
This should resolve an issue where config behind a symlink was not being properly reloaded when edited.
2017-06-23Add dim color supportJake Merdich
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.
2017-05-28Add config file as cli option (#576)Niklas Claesson
* 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.
2017-05-25Add support for running commands on key press (#566)Dominik Miedziński
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.
2017-05-06Add window padding optionTuomas Siipola
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.
2017-05-01Combine FontOffset and GlyphOffset structs into Delta structAaron Williamson
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.
2017-05-01Add glyph offset option to user configurationAaron Williamson
Add the ability to move glyphs within their cells on a global basis via an option in the configuration file.
2017-05-01Improve freetype metric usageAaron Williamson
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.
2017-02-25Change cursor colors config to use text and cursorJoe Wilm
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.
2017-02-22Add hide cursor when typing optionTuomas Siipola
2017-02-14Add TERM config entryAnders Rasmussen
2017-02-11Move color list to Term structJoe Wilm
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.
2017-02-10Print YAML errors using DisplayJoe Wilm
Much nicer error message than with Debug.