aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
AgeCommit message (Collapse)Author
2017-10-26[WIP] Add antialias optionantialias-optionJoe Wilm
Still a WIP because of unimplemented Linux portion. Support has been added for font rasterization options. At this time, the only supported option is antialias. It's a tri-state flag which can be either ~ for "use default", true to force antialias, and false to force disable antialias. The options may be specified both globally and per font section. The per font sections override global options. An example of a complex config follows. In the example, the global value requests using default antialias settings, and the normal face disables antialias. font: options: antialias: ~ normal: family: monospace options: antialias: false Finally, note that the top level font.options is used for fallback fonts.
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.
2017-02-07Add visual bell supportMark Andrus Roberts
This commit adds support for a visual bell. Although the Handler in src/ansi.rs warns "Hopefully this is never implemented", I wanted to give it a try. A new config option is added, `visual_bell`, which sets the `duration` and `animation` function of the visual bell. The default `duration` is 150 ms, and the default `animation` is `EaseOutExpo`. To disable the visual bell, set its duration to 0. The visual bell is modeled by VisualBell in src/term/mod.rs. It has a method to ring the bell, `ring`, and another method, `intensity`. Both return the "intensity" of the bell, which ramps down from 1.0 to 0.0 at a rate set by `duration` and `animation`. Whether or not the Processor waits for events is now configurable in order to allow for smooth drawing of the visual bell.
2017-02-07Semantic SelectionXiaoyu Yin
Fix tests and add line select Refactor BidirectionalIter to remove if blocks Allow for cells tagged with WRAPLINE to continue expanding the selection Reorganize config into structs Add test coverage that callbacks are called Cleanup mouse config - Uses Duration type for ClickHandler::threshold - Removes `action` property from ClickHandler--this can be added in a backwards compatible way later on - Renames ClickState::DblClick to DoubleClick fixup! Cleanup mouse config
2017-02-06Configurable window dimensionsAnders Rasmussen
Adds a configuration option `dimensions` which will set initial window size by columns and lines. Changes to the config file will require restart. resolves #370
2017-02-05Add "Quit" action to allow exit on a Cmd-W or Cmd-QBrandur
Adds a new "Quit" action and binds it to Cmd-W and Cmd-Q on Mac OS in an attempt to make Alacritty feel more like a "normal" citizen of the operating system. Alternatives like Ctrl-D are okay, but I usually want to leave my shells nested within Tmux open even if I exit my terminal. It's also largely selfish: I've built up muscle memory over the years that takes my fingers to Cmd-Q first (and I suspect I'm not the only one). The implementation for an exit is copied from `event.rs` which notably is already tagged with a FIXME. It seems that `tty.rs` contains a `process_should_exit` system to help handle a `SIGCHLD`, and it's possible that these two exit implementations should be merged together. I could probably tackle that as my next project. As mentioned in #218, Alacritty can't really spawn other windows right now, so I've tied in Cmd-W as simply another synonym for quitting until that's implemented. Fixes #218.
2017-02-03Alacritty now compiles on stable Rust :tada:Joe Wilm
2017-01-30Fix bug with cursor colors and old configJoe Wilm
There was no default supplied for Colors.cursor. This caused config not specifying that property to break. Adding a default should fix that.
2017-01-29Update to serde 0.9 and serde-yaml 0.6.Joe Wilm
2017-01-29support for inverting the cursor or using colorsDanny Dulai
2017-01-28Add support for -e argumentNiklas Claesson
2017-01-25Implement argument passing in configNiklas Claesson
This commit implements the following syntax in the config file: ```yaml shell: program: /bin/bash args: - --login - --norc ```
2017-01-23Change to process::CommandNiklas Claesson
2017-01-18Make it run on FreeBSDjohalun
2017-01-12make thin stroke rendering configurableTom Crayford
Makes thin stroke rendering for darwin configurable by a new toplevel key under `font:` in the config file. Defaults to false, has no impact on non macos.
2017-01-09Add another optional config path `$HOME/.alacritty.yml`Alberto Corona
- Added note about the default file created if no path is found
2017-01-09Support config path `$XDG_CONFIG/alacritty.yml`Alberto Corona
- Update README to reflect changes
2017-01-09Conform to XDG spec for configurationAlberto Corona
- Use $XDG_CONFIG_HOME/alacritty/alacritty.yml for loading the configuration file falling back to $HOME/.config/alacritty/alacritty.yml - Closes #203
2017-01-07Merge pull request #138 from honza/masterJoe Wilm
Add "shell" option to config
2017-01-07TypoHonza Pokorny