aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/cli.rs
Commit message (Collapse)AuthorAge
* Add option to drain PTY on shutdownAndrew Borg (Kashin)2025-01-16
| | | | | This patch removes the `hold` option on `alacritty_terminal` in favor of a `drain_on_exit` option, which will drain the PTY before shutdown. The hold logic is instead handled in `alacritty`.
* Pass activation token in alacritty msg create-windowKirill Chibisov2025-01-04
| | | | Fixes #8337.
* Add headless modeChristian Duerr2024-10-15
| | | | | | | | This patch adds a daemon mode to Alacritty which allows starting the Alacritty process without spawning an initial window. While this does not provide any significant advantage over the existing behavior of always spawning a window, it does integrate nicer with some setups and is a pretty trivial addition.
* 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
|
* Bump dependenciesKirill Chibisov2024-07-17
| | | | Update winit and clap to latest versions.
* Fix dynamic title override for multiple windowsChristian Duerr2024-04-23
| | | | | | | | | | | This fixes an issue where Windows spawned after the initial one through IPC or bindings would not update their title due to the initial window having its title set through the CLI. Title changes are still inhibited for additional windows when they are spawned through `alacritty msg create-window` with the `--title` CLI option added. Closes #6836.
* Allow setting terminal env vars via PTY optionsKirill Bulatov2024-03-18
| | | Closes #7778.
* Fix hint `Select` action for hyperlink escapeChristian Duerr2024-03-12
| | | | | | | | | | | | This fixes an issue where the `Select` action for hyperlink escape text would select the entire line, instead of selecting only the hyperlink itself. It also changes the way hyperlinks with the same ID are highlighted, removing the restriction of being on consecutive lines and instead highlighting all visible cells that correspond to the matching hyperlink. Closes #7766.
* Add migrate to alacritty(1)Kirill Chibisov2023-11-24
|
* 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.
* Update winit to 0.29.2 and copypasta to 0.10.0Kirill Chibisov2023-10-21
| | | | | | | | | Fixes #7236. Fixes #7201. Fixes #7146. Fixes #6848. Fixes #3601. Fixes #3108. Fixes #2453.
* Add bindings for macOS tabsKirill Chibisov2023-09-04
| | | | | This doesn't represnet the movement to add tabs on any other platform, unless winit could add a similar API for them.
* 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 clap to v4.2.7Kirill Chibisov2023-05-17
| | | | | Fixes #6879. Fixes #6874.
* Add -T short form for --titleJames McCoy2022-12-11
| | | | | | | | | | | | Debian-based distributions provide a standard interface to launch a terminal via the x-terminal-emulator name. In order for a terminal emualtor to satisfy that interface, it must * Be VT100 compatiable * Support the "-e <command> <args>" CLI option * Support the "-T <title>" CLI option Adjust the short form of --title accordingly, providing -t as an alias to avoid breaking any existing usage.
* Fix `--help` output for `--class` to match man pagesAndrzej Grzeslak2022-10-18
| | | | | | The output of --help did not match the man pages with regards to the ordering of arguments for the --class flag. This has now been fixed. Fixes #6413.
* 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.
* Rework `--class` CLI optionKirill Chibisov2022-08-25
| | | | | | | | | This commit swaps the order of `general` and `instance` arguments and also sets `instance` to `general` when only one argument was provided. This should make this option behave like in other terminals on X11, since they set either both or general by default, but not instance like Alacritty. Fixes #6279.
* Add hexadecimal support to --embedSabu Siyad2022-06-28
| | | Closes #6145.
* Add value hints for clap file pathsChristian Duerr2022-06-16
| | | | This ensures that the generated completions properly suggest file paths for arguments which accept them.
* Fix flickering during resize on WaylandKirill Chibisov2022-06-09
| | | | | This also fixes an issue of windows not being rendered while resizing. Fixes #6069.
* Fix a few minor clippy lintsYuri Astrakhan2022-06-02
|
* Migrate from structopt to clap 3Christian Duerr2022-01-04
|
* Add title/class CLI parameters to create-windowKirill Chibisov2022-01-03
| | | | | This adds the ability to pass title and class over IPC via the create-window subcommand, so users can run only one instance for windows of different spurposes in the window managers of their choice.
* Fix test failures due to CLI parametersChristian Duerr2021-12-25
| | | Fixes #5717.
* Fix CreateNewWindow CLI fallbackChristian Duerr2021-12-23
| | | | | | | | | | | | | | The existing behavior for the new CreateNewWindow actions was to always pass in their own options, which would discard the existing options configured on the terminal's PTY config. To fix this the behavior for CreateNewWindow is now the same as for the initial window creation, the config values are overwritten conditionally based on their individual presence in the CLI options. However all temporary CLI options set on the "master" Alacritty instance are discarded by all future windows. Fixes #5659.
* Bump glutin to 0.28.0Kirill Chibisov2021-12-03
| | | | | | | | Fixes #5603. Fixes #5422. Fixes #5350. Fixes #4105. 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.
* Switch to clap-generated completionsChristian Duerr2021-11-19
| | | | | | | | | | | | | | | The current completions required a lot of domain-specific knowledge about each individual shell and their completion functionality. Much of which is sparsely documented. While clap does not generate perfect completions, since parameters like `-e` are missing completions, it does a reasonable job while requiring no work on writing these completions. Since access to `cli.rs` isn't possible from the `build.rs`, these completions aren't always generated on build. Instead a test verifies that there has been no changes to these completions and provides a simple code sample for re-generating them. This should provide a simple solution with minimal overhead.
* Add multi-window supportChristian Duerr2021-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously Alacritty would always initialize only a single terminal emulator window feeding into the winit event loop, however some platforms like macOS expect all windows to be spawned by the same process and this "daemon-mode" can also come with the advantage of increased memory efficiency. The event loop has been restructured to handle all window-specific events only by the event processing context with the associated window id. This makes it possible to add new terminal windows at any time using the WindowContext::new function call. Some preliminary tests have shown that for empty terminals, this reduces the cost of additional terminal emulators from ~100M to ~6M. However at this point the robustness of the daemon against issues with individual terminals has not been refined, making the reliability of this system questionable. New windows can be created either by using the new `CreateNewWindow` action, or with the `alacritty msg create-window` subcommand. The subcommand sends a message to an IPC socket which Alacritty listens on, its location can be found in the `ALACRITTY_SOCKET` environment variable. Fixes #607.
* Update rustfmt configurationChristian Duerr2021-10-11
| | | | | | | | | | | | | | | | | In this change I went through all current rustfmt configuration options and expanded our existing configuration with overrides whenever deemed appropriate. The `normalize_doc_attributes` option is still unstable, but seems to work without any issues. Even when passing macros like `include_str!` that is recognized properly and not normalized. So while this wasn't an issue anywhere in the code, it should make sure it never will be. When it comes to imports there are two new major additions. The `imports_granularity` and `group_imports` options. Both mostly just incorporate unwritten rules that have existed in Alacritty for a long time. Unfortunately since `alacritty_terminal` imports in `alacritty` are supposed to be separate blocks, the `group_imports` option cannot be used.
* 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.
* 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.
* 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
|