aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/config/mod.rs
Commit message (Collapse)AuthorAge
* Add migration support for TOML config changesChristian Duerr2024-10-02
| | | | | | | | | | | | | | This patch allows running `alacritty migrate` to automatically apply configuration changes made to the TOML format, like moving `ipc_socket` to `general.ipc_socket`. This should reduce the friction of moving around individual options significantly, while also persisting the format of the existing TOML file thanks to `toml_edit`. The YAML migration has been simplified significantly to only switch the format of the file from YAML to TOML. The new TOML features are used for everything else.
* Move root config fields to `[general]` sectionChristian Duerr2024-10-02
| | | | | | | | | | | Some users struggle with TOML, since root options must always be at the top of the file, since they're otherwise associated with the last table. To avoid misunderstandings, all root-level fields have been removed. A new `general` section was added to allow housing configuration options that do not fit into any more specific groups. Closes #7906.
* Unify string formattingHamir Mahal2024-07-24
|
* Support relative imports in config fileJoshua Cao2024-07-02
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Fix error with missing importsChristian Duerr2024-05-23
| | | | | | | | | | | | | | This fixes a regression, likely introduced in 5d173f6df, which changed the severity of missing imports from `info` back to `error`. The cause of this issue was a more complicated error handling mechanism, which explicitly translated IO errors to a separate enum variant without accounting for it in all scenarios. While retrospectively this seems completely unnecessary to me, it did mean shorter error messages in case the main config file was not found. To preserve the benefits of both approaches, explicit handling for the `NotFound` IO error has been added when loading the main configuration file.
* Fix missing config import warningMatt Fellenz2024-04-21
|
* Ignore null values in `alacritty migrate`Kirill Chibisov2024-01-05
| | | | This should help with broken YAML configurations by throwing nulls away, which are not representable in toml.
* Add `--option` argument to `create-window`Christian Duerr2023-11-11
| | | | | | | | | | | | This patch adds a new CLI parameter to the `create-window` subcommand, matching the existing `--option` parameter when creating a new Alacritty instance. This parameter allows setting up the initial window configuration from the CLI without having to call `alacritty msg config`, making sure that all options are set appropriately right from the start. Closes #6238.
* Unify CLI config override mechanismsChristian Duerr2023-11-11
| | | | | | | | | This patch changes the way the `-o` config option works when specified at startup to function the same way as the IPC mechanism. While this should technically perform the exact same way, it should hopefully make it a little easier to understand how CLI config replacement works.
* 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 clippy warningsPavel Roskin2023-10-29
|
* Update to the new winit keyboard APIKirill Chibisov2023-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as ability to bind dead keys. It also fixes long standing issues with the virtual key code bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal conversions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes #6842. Fixes #6455. Fixes #6184. Fixes #5684. Fixes #3574. Fixes #3460. Fixes #1336. Fixes #892. Fixes #458. Fixes #55.
* Remove mouse double_click/triple_click optionsSonu Bardai2023-06-29
| | | Fixes #6962.
* Add TOML migration recommendation to warningChristian Duerr2023-06-26
| | | | This adds a little recommendation to use `alacritty migrate` to automatically transition configuration files from YAML to TOML.
* Switch to TOML configuration formatChristian Duerr2023-06-12
| | | | | | | | | | | | | | | This switches Alacritty's default configuration format from yaml to toml. While yaml is still supported, it is done by converting it to toml and should be removed entirely in the future. All existing features were persisted based on my testing. Behavior should not change much, though `--option` might have slightly different behavior since the entire line is not interpreted as one line of toml. A new `alacritty migrate` subcommand has been added which allows automatic migration from yaml to toml. This also could be used as a facility to automatically fix configuration file changes in the future. Closes #6592.
* Update xdg and dirs crateKirill Chibisov2023-05-17
| | | | | | The recent version on xdg crate moved to home crate which is used by cargo. Thus to query for home directory we can use the home dependency instead which is smaller.
* Ignore special files for live config reloadKirill Chibisov2022-06-16
| | | | | | | | 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>
* 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.
* Migrate CLI config to structoptChristian Duerr2021-08-18
| | | | | | | | | | | | | While structopt also uses clap under the hood, the configuration through annotations allows for significantly more maintainable and concise CLI definition. This will also make it far easier to have platform-specific options, which is problematic with clap since no individual methods can be removed from its builder. The change in Alacritty's CLI has been kept to a minimum with the only significant changes being the `--version` flag listed before the `-v` flag and the authors all on the same line.
* Add ExpandSelection mouse binding actionJason Heard2021-07-29
| | | Fixes #4132.
* Fix clippy warningsChristian Duerr2021-07-03
|
* Fix default URL bindingChristian Duerr2021-05-10
| | | | | The default binding for launching the URL hints was documented as Ctrl+Shift+U, but never actually set. This adds this binding as the default instead of having URLs only launchable using the mouse.
* Add regex terminal hintsChristian Duerr2021-03-01
| | | | | | | | | | | | | | | | This adds support for hints, which allow opening parts of the visual buffer with external programs if they match a certain regex. This is done using a visual overlay triggered on a specified key binding, which then instructs the user which keys they need to press to pass the text to the application. In the future it should be possible to supply some built-in actions for Copy/Pasting the action and using this to launch text when clicking on it with the mouse. But the current implementation should already be useful as-is. Fixes #2792. Fixes #2536.
* 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.
* 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 separate mode for search bindingsChristian Duerr2020-12-19
|
* Fix live reload with broken yaml on startChristian Duerr2020-12-14
| | | | | | | | | | | | | Since the current behavior would just load the default configuration file whenever the configuration file couldn't be loaded, the path was not set to any value. As a result however, the live config reload feature would not work with a broken yaml (one which cannot be deserialized, not one with warnings). If a configuration file has been specified, but the deserialization still failed, the path is now preserved on the default configuration file to make it possible to live reload a fix for the issue. Fixes #4561.
* Print multiline logs in one write callKirill Chibisov2020-12-10
| | | | Fixes potential split of multiline logs in the multithreaded context by writing them all at once.
* Add support for '~/' in config importsChristian Duerr2020-11-24
| | | | | | | | | | | This allows the configuration file imports to start with '~/' and resolve relative to the user's home directory. There is no support for '~user/' or '$HOME/' or any other shell expansion. However since paths relative to the home directory should be sufficient for everything, this provides a very simple solution without any significant drawbacks. Fixes #4157.
* Ignore nonexistent config imports instead of raising an errorJames Simpson2020-11-19
| | | Fixes: #4330.
* Deprecate the WinPTY backendChristian Duerr2020-11-06
|
* Fix CLI arguments without config fileChristian Duerr2020-09-20
| | | | | | | | | | | Since we only applied the CLI arguments as overrides to the configuration file after the file was loaded, all CLI arguments that are stored on the config would be dropped without a configuration file in place. This also makes sure that all configuration file config overrides are still loaded if the configuration file could not be loaded for any reason, since there's no reason why we'd just drop everything in that case.
* Add CLI parameter to override config optionsChristian Duerr2020-08-22
| | | | | | | | This uses the facilities added in 3c3e6870dedad56b270f5b65ea57d5a6e46b1de6 to allow overriding individual configuration file options dynamically from the CLI using the --options/-o parameter. Fixes #1258.
* Fix config import error handlingChristian Duerr2020-08-22
|
* 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.
* Bump minimum supported Rust version to 1.43.0Kirill Chibisov2020-07-28
|
* 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.
* Remove alacritty.yml mentions from font crate errorsKirill Chibisov2020-07-11
|
* Add option to run command on bell Kirill Chibisov2020-07-10
| | | Fixes #1528.
* Extend style guideline documentationChristian Duerr2020-05-05
|
* 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.
* Revert "Fix backspace deleting chars when IME is open"Christian Duerr2020-02-10
| | | | | | | | | | | This reverts commit 7f4dce2ee04859fb0b48f15cf808b60065778703. Originally it was assumed that macOS always sends the \x7f on backspace anyways, however this is not true. It seems like the character on backspace can change even within the same terminal session, so we need to have our own binding to reliably set the correct binding. A solution for #1606 should be implemented in cooperation with winit.
* Fix inconsistent test module namingChristian Duerr2020-01-28
|
* Remove scrolling.auto_scroll featureKirill Chibisov2020-01-20
| | | Fixes: #1873
* Fix reset CLI parameters on config reload (#3216)Christian Duerr2020-01-17
| | | | | | Fix reset CLI parameters on config reload Fixes #3197.
* Force exact modifiers match for mouse bindingsChristian Duerr2020-01-10
| | | Fixes #3152.
* Replace deprecated Error methodssterlingjensen2020-01-03
|
* Add support for alternate scroll escapeAleksey Kuznetsov2019-10-15
| | | | Fixes #2727.