Skip to content

GregTheMadMonk/alacritty-smooth-cursor

 
 

Repository files navigation

Alacritty Logo

Alacritty - A fast, cross-platform, OpenGL terminal emulator

About this fork!

This fork introduces basic cursor animations to Alacritty in a rather simple way. It replaces the block cursor render by a rectangle with a changed blend mode and triggers a surface re-render every frame when the window is visible.

Available in AUR: https://aur.archlinux.org/packages/alacritty-smooth-cursor-git

Alacritty smooth cursor demo

Known issues

  • When I tried running this with Waylad, I got a lot of artifacts and it didn't update as smooth in general. Running via XWayland (env -u WAYLAND_DISPLAY alacritty) works though
  • Currently redraws are dumb and update the window every frame even if nothing has changed. Expect a little GPU usage in idle.
  • "Spring" effect looks nice, but may be annoying when the cursor jumps around a lot. TODO: Implement a restriction on how much the cursor size may change during movement
  • Block cursor may look really off due to blending hack that essentially just inverts the character color. It is recommended to replace it with "underline" (see config or GIF demo)

Configure

Add/change the following entries in your alacritty.toml:

[cursor]
# Set to false to disable completely
smooth_motion = true
# 0.0 = cursor is not moving, 1.0 = cursor moves instantly
smooth_motion_factor = 0.2
# 0.0 = broken, 1.0 = cursor shape is unaffected by movement
smooth_motion_spring = 0.5
# Limits how the cursor size may change
smooth_motion_max_stretch_x = 3.0
smooth_motion_max_stretch_y = 3.0
# Override "block" cursor if you don't like how it looks in this fork
# I prefer "underline"
block_replace_shape = "underline"

Back to the original README...


Alacritty - A fast, cross-platform, OpenGL terminal emulator

About

Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.

The software is considered to be at a beta level of readiness; there are a few missing features and bugs to be fixed, but it is already used by many as a daily driver.

Precompiled binaries are available from the GitHub releases page.

Join #alacritty on libera.chat if you have questions or looking for a quick help.

Features

You can find an overview over the features available in Alacritty here.

Further information

Installation

Alacritty can be installed by using various package managers on Linux, BSD, macOS and Windows.

Prebuilt binaries for macOS and Windows can also be downloaded from the GitHub releases page.

For everyone else, the detailed instructions to install Alacritty can be found here.

Requirements

  • At least OpenGL ES 2.0
  • [Windows] ConPTY support (Windows 10 version 1809 or higher)

Configuration

You can find the documentation for Alacritty's configuration in man 5 alacritty, or by looking at the website if you do not have the manpages installed.

Alacritty doesn't create the config file for you, but it looks for one in the following locations:

  1. $XDG_CONFIG_HOME/alacritty/alacritty.toml
  2. $XDG_CONFIG_HOME/alacritty.toml
  3. $HOME/.config/alacritty/alacritty.toml
  4. $HOME/.alacritty.toml

Windows

On Windows, the config file should be located at:

%APPDATA%\alacritty\alacritty.toml

Contributing

A guideline about contributing to Alacritty can be found in the CONTRIBUTING.md file.

FAQ

Is it really the fastest terminal emulator?

Benchmarking terminal emulators is complicated. Alacritty uses vtebench to quantify terminal emulator throughput and manages to consistently score better than the competition using it. If you have found an example where this is not the case, please report a bug.

Other aspects like latency or framerate and frame consistency are more difficult to quantify. Some terminal emulators also intentionally slow down to save resources, which might be preferred by some users.

If you have doubts about Alacritty's performance or usability, the best way to quantify terminal emulators is always to test them with your specific usecases.

Why isn't feature X implemented?

Alacritty has many great features, but not every feature from every other terminal. This could be for a number of reasons, but sometimes it's just not a good fit for Alacritty. This means you won't find things like tabs or splits (which are best left to a window manager or terminal multiplexer) nor niceties like a GUI config editor.

License

Alacritty is released under the Apache License, Version 2.0.

About

A cross-platform, OpenGL terminal emulator. Fork with a basic cursor movement animation

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 96.4%
  • Shell 2.3%
  • Other 1.3%