aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/cli.rs
Commit message (Collapse)AuthorAge
* 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.
* Remove redundant CLI flagsChristian Duerr2020-11-26
| | | | | | | | | | | | | This removes some of Alacritty's CLI flags since the same functionality is provided by the '--option' flag now. The removed flags are: * '--persistent-logging' * '--live-config-reload' * '--no-live-config-reload' * '--dimensions' * '--position' Fixes #4246.
* Add support for single line terminalsii412020-09-27
| | | | | | | | | | | | | | | | | This changes the minimum terminal dimensions from 2 lines and 2 columns, to 1 line and 2 columns. This also reworks the `SizeInfo` to store the number of columns and lines and consistently has only the terminal lines/columns stored, instead of including the message bar and search in some places of the Alacritty renderer/input. These new changes also make it easy to properly start the selection scrolling as soon as the mouse is over the message bar, instead of waiting until it is beyond it. Fixes #4207. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Improve example for the -o CLI flagNathan Lilienthal2020-09-13
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* 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.
* Remove markdownish markup from `--help` outputKirill Chibisov2020-08-10
|
* 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.
* Update --help for class option to match manpageJeff Windsor2020-07-04
|
* 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.
* Refactor Shell, Command, and Launcher to share implKirill Chibisov2020-06-05
|
* Extend style guideline documentationChristian Duerr2020-05-05
|
* Fix live config reload for window titleChristian Duerr2020-03-14
| | | | | | | | | | | | | This enables live config reload for the window title. This includes updating the title after it has been pushed and popped from the title stack. The dynamic title option also isn't disabled automatically anymore when the title is set in the config. If the title is set from CLI, the behavior is unchanged and dynamic title changes are still disabled. If the dynamic title is disabled in the config, the title is still updated when the config title is changed. Dynamic title now only prevents changes to the UI's title.
* Fix inconsistent test module namingChristian Duerr2020-01-28
|
* Fix crash with invalid working directoryChristian Duerr2020-01-12
|
* Fix keybinding deserializationChristian Duerr2020-01-07
| | | Fixes #3160.
* Fix incorrect config path in --help and manpageChristian Duerr2020-01-06
| | | Fixes #3154.
* Clean up Windows PTY string handlingDavid Hewitt2020-01-02
| | | | | Removes widestring and dunce dependencies, reduces some code duplication and corrects a few typos.
* Fix clippy warningsChristian Duerr2019-11-02
|
* Fix setting persistent logging via CLIDo Duy2019-10-24
|
* Fix window title not filled by defaultDustin2019-10-17
| | | | | | | | | | | In the config, if `window` is undefined, the derived `Default` for the String `title` is used, which is an empty String. This was unintended, and causes issues in gnome-shell (e.g. in the alt-tab dialog) when the window title is an empty string. This commit adds a manually implemented default for the `WindowConfig`, it's the same as the derived `Default`, except for the `title`, which will now always be "Alacritty" as originally intended.
* Add support for title stack escape sequencesDustin2019-10-14
| | | | | | | | | | | | This commit adds the concept of a "title stack" to the terminal. Some programs (e.g. vim) send control sequences `CSI 22 ; 0` (push title) and `CSI 23 ; 0` (pop title). The title stack is just a history of previous titles. Applications can push the current title onto the stack, and pop it back off (setting the window title in the process). Fixes #2840.
* 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 Xembed supportmkosem2019-09-24
| | | | Fixes #631.
* 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 build without git绅士喵2019-06-06
|
* 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.