aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/config/mod.rs
Commit message (Collapse)AuthorAge
* Remove `alacritty_config` from alacritty_terminalKirill Chibisov2023-11-10
| | | | | There's no need to force alacritty's user configuration on other users of the crate, thus provide the options actually used by alacritty_terminal itself.
* Fix typosPavel Roskin2023-10-25
|
* Add `terminal` config section to control OSCs Kirill Chibisov2023-07-22
| | | | | | | | | | | | | | 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>
* Add errors for deserializing with unknown fieldsChristian Duerr2023-06-17
| | | | | | | | | Currently there are still some places where `Deserialize` is used rather than `ConfigDeserialize`, which means that the built-in warning for unused fields is not emitted automatically. To ensure users don't have invalid configurations, the `#[serde(deny_unknown_fields)]` annotation has been added to these structs, making it a hard error when an unknown field is present.
* Switch to VTE's built-in ansi featureAnhad Singh2023-05-23
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Fix clippy warningsChristian Duerr2022-10-12
| | | | | This patch applies all clippy lints currently present on the latest clippy master than are compatible with our oldstable clippy (only exception is the `_else(||` stuff).
* Fix IPC config overriding previous valuesChristian Duerr2022-09-17
| | | | | | | | | | | | | | Before this patch whenever changing the IPC configuration, all previous configuration options would be discarded. This was the case even when the new option was invalid. This patch ensures that the IPC config is only ever cleared when the `--reset` flag is passed. Invalid IPC config options are logged and discarded. Additionally whenever a new IPC config message is sent, all previous IPC error messages are cleared. Closes #6330.
* Add IPC config subcommandChristian Duerr2022-09-01
| | | | | | | | | | | | | | | | | | | | 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.
* Add `cursor.blink_timeout` config optionKirill Chibisov2022-07-01
| | | | | | This option should prevent extensive power usage due to cursor blinking when there's no user activity being performed. Fixes #5992.
* Fix a few minor clippy lintsYuri Astrakhan2022-06-02
|
* Add damage tracking and reporting to compatible compositorsKirill Chibisov2022-02-02
| | | | | | | | | | | | | | This allows compositors to only process damaged (that is, updated) regions of our window buffer, which for larger window sizes (think 4k) should significantly reduce compositing workload under compositors that support/honor it, which is good for performance, battery life and lower latency over remote connections like VNC. On Wayland, clients are expected to always report correct damage, so this makes us a good citizen there. It can also aid remote desktop (waypipe, rdp, vnc, ...) and other types of screencopy by having damage bubble up correctly. Fixes #3186.
* Add parameters to `msg create-window` subcommandKirill Chibisov2021-11-22
| | | | | | | | | | | | | | | Alacritty's `msg create-window` subcommand would previously inherit all the CLI parameters from the original executable. However not only could this lead to unexpected behavior, it also prevents multi-window users from making use of parameters like `-e`, `--working-directory`, or `--hold`. This is solved by adding a JSON-based message format to the IPC socket messages which instructs the Alacritty server on which CLI parameters should be used to create the new window. Fixes #5562. Fixes #5561. Fixes #5560.
* Update dependenciesChristian Duerr2021-02-13
| | | | | | This introduces some duplicate dependencies, though they are necessary to build properly without any warnings. Fixes #4735.
* Move renderable cell transformation to alacrittyChristian Duerr2021-01-24
| | | | | | | | | | | | This refactors a large chunk of the alacritty_terminal API to expose all data necessary for rendering uniformly through the `renderable_content` call. This also no longer transforms the cells for rendering by a GUI but instead just reports the content from a terminal emulation perspective. The transformation into renderable cells is now done inside the alacritty crate. Since the terminal itself only ever needs to know about modified color RGB values, the configuration for colors was moved to the alacritty UI code.
* Fix deserialization of untagged enumsChristian Duerr2021-01-02
| | | Fixes #4634.
* Remove Windows WinPTY backendChristian Duerr2021-01-01
|
* Replace serde's derive with custom proc macroChristian Duerr2020-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the existing `Deserialize` derive from serde with a `ConfigDeserialize` derive. The goal of this new proc macro is to allow a more error-friendly deserialization for the Alacritty configuration file without having to manage a lot of boilerplate code inside the configuration modules. The first part of the derive macro is for struct deserialization. This takes structs which have `Default` implemented and will only replace fields which can be successfully deserialized. Otherwise the `log` crate is used for printing errors. Since this deserialization takes the default value from the struct instead of the value, it removes the necessity for creating new types just to implement `Default` on them for deserialization. Additionally, the struct deserialization also checks for `Option` values and makes sure that explicitly specifying `none` as text literal is allowed for all options. The other part of the derive macro is responsible for deserializing enums. While only enums with Unit variants are supported, it will automatically implement a deserializer for these enums which accepts any form of capitalization. Since this custom derive prevents us from using serde's attributes on fields, some of the attributes have been reimplemented for `ConfigDeserialize`. These include `#[config(flatten)]`, `#[config(skip)]` and `#[config(alias = "alias)]`. The flatten attribute is currently limited to at most one per struct. Additionally the `#[config(deprecated = "optional message")]` attribute allows easily defining uniform deprecation messages for fields on structs.
* Add blinking cursor supportDettorer2020-11-23
| | | | | | | | This adds support for blinking the terminal cursor. This can be controlled either using the configuration file, or using escape sequences. The supported control sequences for changing the blinking state are `CSI Ps SP q` and private mode 12.
* Deprecate the WinPTY backendChristian Duerr2020-11-06
|
* Add configuration file importsChristian Duerr2020-08-21
| | | | | | | | | | | | | | | | | | | This adds the ability for users to have multiple configuration files which all inherit from each other. The order of imports is chronological, branching out to the deepest children first and overriding every field with that of the configuration files that are loaded at a later point in time. Live config reload watches the directories of all configuration files, allowing edits in any of them to update Alacritty immediately. While the imports are live reloaded, a new configuration file watcher will only be spawned once Alacritty is restarted. Since this might cause loops which would be very difficult to detect, a maximum depth is set to limit the recursion possible with nested configuration files. Fixes #779.
* Remove gui dependencies from alacritty_terminalKirill Chibisov2020-07-11
| | | | | | | | This commit removes font dependency from alacritty_terminal, so it'll simplify the usage of alacritty_terminal as a library, since you won't link to system's libraries anymore. It also moves many alacritty related config options from it. Fixes #3393.
* Add option to run command on bell Kirill Chibisov2020-07-10
| | | Fixes #1528.
* Add regex scrollback buffer searchChristian Duerr2020-07-09
| | | | | | | | | | This adds a new regex search which allows searching the entire scrollback and jumping between matches using the vi mode. All visible matches should be highlighted unless their lines are excessively long. This should help with performance since highlighting is done during render time. Fixes #1017.
* Remove copyright notice from filesChristian Duerr2020-06-06
| | | | | | | | | | | | | | Keeping the license as part of every file bloats up the files unnecessarily and introduces an additional overhead to the creation of new modules. Since cargo already provides excellent dependency management, most of the code-reuse of Alacritty should occur through Rust's dependency management instead of copying it source. If code is copied partially, copying the license from the main license file should be just as easy as copying from the top of the file and making some adjustments based on where it is used is likely necessary anyways.
* Fix class and cursor thickness deserializationKirill Chibisov2020-06-05
| | | Fixes #3820.
* Refactor Shell, Command, and Launcher to share implKirill Chibisov2020-06-05
|
* Extend style guideline documentationChristian Duerr2020-05-05
|
* Add config option to set cursor thicknessKirill Chibisov2020-04-15
| | | Fixes #3526.
* Add modal keyboard motion modeChristian Duerr2020-03-18
| | | | | | | | | | | | | | | | | | | This implements a basic mode for navigating inside of Alacritty's history with keyboard bindings. They're bound by default to vi's motion shortcuts but are fully customizable. Since this relies on key bindings only single key bindings are currently supported (so no `ge`, or repetition). Other than navigating the history and moving the viewport, this mode should enable making use of all available selection modes to copy content to the clipboard and launch URLs below the cursor. This also changes the rendering of the block cursor at the side of selections, since previously it could be inverted to be completely invisible. Since that would have caused some troubles with this keyboard selection mode, the block cursor now is no longer inverted when it is at the edges of a selection. Fixes #262.
* Remove `tabspaces` config optionChristian Duerr2020-03-01
| | | | | | | This completely removes the tabspaces option from the Alacritty configuration, due to frequent misuse of it. Based on some research, none of the terminal emulators support setting the value for tabspaces or read the terminfo to determine init_tabs value at startup. The tested terminal emulators were URxvt, XTerm, and Termite.
* Disable drawing bold text bright by defaultKirill Chibisov2020-01-20
| | | | | | | | | | | | | Since the assumption is usually that bold text is drawn in bright colors, this might break some applications. However some other terminals have already taken this leap, which should lessen the impact for Alacritty. Since this might still be desired and necessary for certain applications, the config option is just switched to draw with normal colors by default, however the old behavior can still be restored. Fixes #2779.
* Fix crash with invalid working directoryChristian Duerr2020-01-12
|
* Clean up Windows PTY string handlingDavid Hewitt2020-01-02
| | | | | Removes widestring and dunce dependencies, reduces some code duplication and corrects a few typos.
* Default to ConPTY instead of WinPTYDavid Hewitt2019-12-21
|
* Add --hold CLI flagValentin Ignatev2019-10-09
| | | | | | This implements --hold flag which keeps Alacritty open after its child process exits. Fixes #1165.
* Remove automatic config generationKirill Chibisov2019-10-06
| | | | Fixes #2818.
* Update to winit/glutin EventLoop 2.0Christian Duerr2019-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | This takes the latest glutin master to port Alacritty to the EventLoop 2.0 rework. This changes a big part of the event loop handling by pushing the event loop in a separate thread from the renderer and running both in parallel. Fixes #2796. Fixes #2694. Fixes #2643. Fixes #2625. Fixes #2618. Fixes #2601. Fixes #2564. Fixes #2456. Fixes #2438. Fixes #2334. Fixes #2254. Fixes #2217. Fixes #1789. Fixes #1750. Fixes #1125.
* Add `ReceiveChar` action for passing key's textzsugabubus2019-09-28
|
* Fix double-click selecting trailing tabBen Firth2019-07-26
| | | | Fixes #2639.
* Fix cursor color setting with escape sequenceKirill Chibisov2019-07-10
| | | | | | | | | | | | | The cursor rework introduced a regression where cursor color was always picked from a config file, rather then using `ansi::NamedColor::Cursor` for this purpose. This commit also removes `CursorText` option from `NamedColor` enum, since we can't speculate with `CursorText` during runtime. Cursor rework commits: cfc20d4f34dca535654cc32df18e785296af4cc5 371d13f8ef95157c97f7de9964bcbc89d4a8e930 0d060d5d801e3abb55035269138d819d38fc175b
* Fix saving of ref testsChristian Duerr2019-07-07
| | | | | | | | | Since ref tests were only stored whenever winit requested the window close, they would not get stored properly when the terminal was closed through Alacritty using `exit`, Ctrl+D or similar. This moves the ref test code to the and of the main entry point, which will always be executed regardless of how the terminal was shutdown.
* Allow setting gtk variant and general class on X11Brian Koropoff2019-07-06
|
* Fix redundant static lifetime clippy lintMatthias Krüger2019-06-18
|
* Refactor config parsing filesChristian Duerr2019-05-10
| | | | | | | | This is a large refactor of the config parsing structure, attempting to reduce the size of the file a bit by splitting it up into different modules with more specific purposes. This also fixes #2279.
* Add git hash to version string, and fix crate name (#2397)Nathan Lilienthal2019-05-03
| | | | This moves `cli` out of `alacritty_terminal` and into `alacritty` where it belongs, along with the `clap` dependency.
* Split alacritty into a separate cratesTheodore Dubois2019-04-28
The crate containing the entry point is called alacritty, and the crate containing everything else is called alacritty_terminal.