Skip to content

Commit

Permalink
Bump version to v0.14 (#8)
Browse files Browse the repository at this point in the history
* Add Sixel support

Fixes alacritty#910

* Implementation of the XTSMGRAPHICS sequence.

* Don't clear cells after the right side of the graphic.

* Don’t erase text behind a sixel image; the image might be transparent

We still add a reference to the graphic in the first cell of every
line under the image, but we don’t erase any of the text in any of the
cells.

* remove an unncessary variable from insert_graphic

* Avoid unnecessary clone when set graphic data.

* Define MAX_GRAPHIC_DIMENSIONS as a 2-elements array.

* support DECSET/DECRST (CSI ? Pm h) to change where the cursor ends up

after printing a sixel image. The default is for the cursor to be
moved to the first column of the line after the image. When we receive
CSI ? 8452 h, we will instead leave the cursor on the last line of the
image, on the next column past the end of the image.

* put the TermMode back to just u32; I had miscounted the bits

* move_forward takes a relative column count, not an absolute column number

* Interprets mode 80 as Sixel Display Mode.

This is reverse of the *sixel scrolling* option, which should match the actual
behaviour of DEC terminals.

For reference: alacritty#4763 (comment)

* Fill all cells under a graphic with the template.

With the template we can create hyperlinks attached to the graphic.

To avoid reflow issues when a row is shrank, wrapped rows that only contain
graphic cells are discarded. With this approach we loss some info, like the
hyperlink, but the image is always properly positioned in the grid.

* Allow hue values up to 360 in the Sixel parser.

* Allow replacing part of a graphic with text.

When text is added to a cell with a reference to a graphic, an operation is sent
to the OpenGL thread to replace a subregion of the cell with a transparent area.

If the OpenGL driver supports the GL_ARB_clear_texture extension, the region is
updated with glClearTexSubImage. If the extension is not available, the
texture is updated with glTexSubImage2D.

* Highlight graphics to show hints.

Similar to the underline line rendered when the cursor is over an hyperlink, for
graphics we now render a border around the graphic.

* Allow overlapping graphics.

If a graphic is added over another one, the implementation now checks if new
graphic has transparent pixels in every cell. If so, the graphic is appended to
the cell, instead of replacing the previous one.

SmallVec is used to prevent heap allocation when the cell only contains a single
graphic. This should be the most common scenario.

The GPU will store up to 100 textures. If another texture is added when there
are 100, the oldest one is deleted.

* Optimize graphics replacement.

A simple optimization for inserting graphics is to detect when a new graphic is
replacing completely an existing one. If both graphics have the same size, and
the new one is opaque, we can assume that the previous graphic will not be
displayed anymore, so it is not considered when update the graphics list in a
single cell.

This commit also adds serde implementation for GraphicsCell. This was used to
debug the new logic.

* Fix clippy warnings.

* Use hls_to_rgb implementation from libsixel.

* Changes in sixel module to be compatible with oldstable.

- Reimplement abs_diff().
- Use positional arguments to format the error message in assert_color!().

* Initialize cell dimensions when create a Graphics instance.

This fixes a bug that crashes the terminal when a graphic is added before
resizing the window.

* Support GLES2 Renderer in sixel

* Set graphics limit per cell.

The limit per grid is increased to `1000`, and a new limit per cell is added,
set to `20`.

* Add Eq derive to ClearSubregion.

Suggested by clippy.

* CSI XTSMGRAPHICS Pi=2, Pa=1 should return dimensions that fit in text area

* Remove entry about Sixel support in the changelog.

* Update damage when a graphics is inserted.

* Apply rustfmt to term/mod.rs.

* Apply rustfmt and clippy to the current branch.

* Serialize/Deserialize only if the `serde` feature is set.

* Apply clippy suggestions.

* Include Sixel support in Device Attributes response.

The response for `\e[c` (Send Device Attributes) now returns level 2 with the
Sixel extension.

The other extensions are 6 (Selectively Erasable Characters) and 22 (Color Text).
The values are documented in page 04-19 of DEC-STD-070.

* Upgrade vte fork.

With `$ cargo update vte`.

* Use the published vte-graphics crate, instead of a Git repository.

* Fix sixels position when padding>0

* Bump MSRV to 1.74.0

* Bump dependencies

Update winit and clap to latest versions.

* Document options which are not working everywhere yet

This includes `window.position` and `window.resize_increments`.

* Restart config monitor on import change

This patch checks the hash of the import paths on every config change
and restarts the config monitor whenever the current monitor's hash
diverges from the updated config's list of imports.

Closes alacritty#7981.

* Unify string formatting

* Fix description in alacritty-bindings(5)

Man pages use the man page name as the first word in description. This
also aligns with other man pages we have.

* Make `ConPty` creation fallible

* Remove duplicate clip-path from logo

* Update checkout CI action

* Improve TermMode bitflags initialization

* Make alacritty(1) config paths resemble alacritty(5)

This also fixes the escaping in alacritty(5) page.

* Ignore cursor color request with default colors

Currently when the cursor colors are requested for the default cursor
color, Alacritty always responds with #000000. Since this is most likely
incorrect, this response is misleading.

Realistically there's very little reason why any application would need
to know the color of the (often dynamically changing) default cursor. So
instead of always reporting an incorrect black value, this patch just
stops reporting values unless the cursor color was explicitly changed.

Closes alacritty#8169.

* Fix fullwidth semantic escape characters

Semantic escape characters occupying two two grid cells were always
skipped over, making it impossible to have functional fullwidth
characters as part of semantic escape characters.

This patch fixes this by only skipping over fullwidth spacer cells,
rather than skipping those cells entirely.

Closes alacritty#8188.

* Fix app icon in alt+tab view on Windows

* Move root config fields to `[general]` section

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 alacritty#7906.

* Add migration support for TOML config changes

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.

* Restructure message bar log message

The first line is not really useful for the user, so move it to the
bottom.

* Remove startup notify variables only for shell

This will prevent issues when `setup_env` from `alacritty_terminal` will
remove potentially useful variables for users of the library.

Fixes alacritty#8202.

* Remove unused `Clone` requirements

* Fix highlight invalidation on grid scroll

This fixes an issue where hints highlighted by vi or mouse cursor would
produce an underline on the incorrect line since the highlights only
store the initial match boundaries without accounting for new content
scrolling the terminal.

To accurately invalidate the hint highlights, we use existing damage
information of the current frame. The existing logic to damage hints for
the next frame to account for removal has been changed, since the hints
would otherwise be cleared immediately. Instead we now mark the terminal
as fully damaged for the upcoming frame whenever the hints are cleared.

Closes alacritty#7737.

* Change ctrl+shift+u to ctrl+shift+o

Avoid collisions with IMEs by using ctrl+shift+o. ctrl+shift+u is bound
to open unicode input in a lot of IMEs by default meaning that users
won't ever see the url hints UI.

* Add unicode 16 support

This fixes issues in width calculation for symbols added in Unicode
version 16.

Since the upstream unicode-width crate has not been updated yet, this
makes use of the temporary unicode-width-16 version to support Unicode
16 with Alacritty 0.14.0.

* Fix panic on missing general config section

Fixes alacritty#8230.

* Alacritty version 0.14.0-rc1

* Implement multi-char cursor highlight

Use `end` of the cursor to draw a `HollowBlock` from `start` to `end`.
When cursor covers only a single character, use `Beam` cursor instead
of `HollowBlock`.

Fixes alacritty#8238.
Fixes alacritty#7849.

* Add IME support to inline search

This changes the behavior of inline search from only accepting direct
key inputs, to also accepting IME and paste. The additional characters
are still being discarded, matching the existing behavior.

This also fixes an issue where inline search wouldn't work for
characters requiring modifiers, since the modifier press was interpreted
as the search target instead.

Closes alacritty#8208.

* Add headless mode

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.

* Remove dbg! in migration command

* Alacritty version 0.14.0-rc2

* Fix pipe FD leak on X11

The pipe was not using O_CLOEXEC, so it was leaked into the child.

Fixes alacritty#8249.

* Revert "Add unicode 16 support"

This reverts commit 5dca7a8.

* Do not pull serde without serde feature

alacritty_terminal was pulling `serde` via vte even though
serde feature was disabled.

* Alacritty version 0.14.0

* Use the GitHub CLI client to upload release assets.

The binary for Linux is also added to the release.

The `contents: write` permission is needed to create releases and upload
the assets.

* Clear compiler warnings

* Add missed token for asset upload script

---------

Co-authored-by: Ayose <[email protected]>
Co-authored-by: Daniel Brooks <[email protected]>
Co-authored-by: kumattau <[email protected]>
Co-authored-by: Manuel de Prada <[email protected]>
Co-authored-by: Kirill Chibisov <[email protected]>
Co-authored-by: Christian Duerr <[email protected]>
Co-authored-by: Hamir Mahal <[email protected]>
Co-authored-by: 张小白 <[email protected]>
Co-authored-by: philomathic_life <[email protected]>
Co-authored-by: Dimitri Sabadie <[email protected]>
Co-authored-by: Neil Stewart <[email protected]>
Co-authored-by: Nathan Lilienthal <[email protected]>
Co-authored-by: YizhePKU <[email protected]>
  • Loading branch information
14 people authored Dec 4, 2024
1 parent 4290c0b commit 458433e
Show file tree
Hide file tree
Showing 60 changed files with 1,632 additions and 1,223 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Stable
run: cargo test
- name: Stable (no default features)
Expand All @@ -30,7 +30,7 @@ jobs:
check-macos-x86_64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install target
run: rustup update && rustup target add x86_64-apple-darwin
- name: Build
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+*"]

permissions:
contents: write

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -98,7 +101,7 @@ jobs:
shell: bash

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Test
run: cargo test --release
- name: Build
Expand All @@ -124,13 +127,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get install cmake pkg-config libfreetype6-dev libfontconfig1-dev \
libxcb-xfixes0-dev libxkbcommon-dev python3 scdoc
- name: Test
run: cargo test --release
- name: Build
run: cargo build --release
- name: Generate manpages
run: |
scdoc < extra/man/alacritty.1.scd | gzip -c > "./alacritty.1.gz"
Expand All @@ -139,7 +144,12 @@ jobs:
scdoc < extra/man/alacritty-bindings.5.scd | gzip -c > "./alacritty-bindings.5.gz"
- name: Upload Assets
run: |
binpath="alacritty-linux-$(uname -m).gz"
gzip -9 --stdout target/release/alacritty > "$binpath"
mv ./extra/logo/alacritty-term.svg ./Alacritty.svg
./.github/workflows/upload_asset.sh "$binpath" $GITHUB_TOKEN
./.github/workflows/upload_asset.sh ./Alacritty.svg $GITHUB_TOKEN
./.github/workflows/upload_asset.sh ./alacritty.1.gz $GITHUB_TOKEN
./.github/workflows/upload_asset.sh ./alacritty-msg.1.gz $GITHUB_TOKEN
Expand Down
87 changes: 5 additions & 82 deletions .github/workflows/upload_asset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,89 +8,12 @@ fi

repo="xxxbrian/alacritty"
file_path=$1
bearer=$2

echo "Starting asset upload from $file_path to $repo."
tag=$(git describe --tags --abbrev=0)

# Get the release for this tag.
tag="$(git describe --tags --abbrev=0)"

# Make sure the git tag could be determined.
if [ -z "$tag" ]; then
printf "\e[31mError: Unable to find git tag\e[0m\n"
exit 1
fi

echo "Git tag: $tag"

# Get the upload URL for the current tag.
#
# Since this might be a draft release, we can't just use the /releases/tags/:tag
# endpoint which only shows published releases.
echo "Checking for existing release..."
upload_url=$(\
curl \
--http1.1 \
-H "Authorization: Bearer $bearer" \
"https://api.github.com/repos/$repo/releases" \
2> /dev/null \
| grep -E "(upload_url|tag_name)" \
| paste - - \
| grep -e "tag_name\": \"$tag\"" \
| head -n 1 \
| sed 's/.*\(https.*assets\).*/\1/' \
)

# Create a new release if we didn't find one for this tag.
if [ -z "$upload_url" ]; then
echo "No release found."
echo "Creating new release..."

# Create new release.
response=$(
curl -f \
--http1.1 \
-X POST \
-H "Authorization: Bearer $bearer" \
-d "{\"tag_name\":\"$tag\",\"draft\":true}" \
"https://api.github.com/repos/$repo/releases" \
2> /dev/null\
)

# Abort if the release could not be created.
if [ $? -ne 0 ]; then
printf "\e[31mError: Unable to create new release.\e[0m\n"
exit 1;
fi

# Extract upload URL from new release.
upload_url=$(\
echo "$response" \
| grep "upload_url" \
| sed 's/.*: "\(.*\){.*/\1/' \
)
if ! gh release view "$tag"
then
gh release create --draft "$tag"
fi

# Propagate error if no URL for asset upload could be found.
if [ -z "$upload_url" ]; then
printf "\e[31mError: Unable to find release upload url.\e[0m\n"
exit 2
fi

# Upload the file to the tag's release.
file_name=${file_path##*/}
echo "Uploading asset $file_name to $upload_url..."
curl -f \
--http1.1 \
-X POST \
-H "Authorization: Bearer $bearer" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file_path" \
"$upload_url?name=$file_name" \
&> /dev/null \
|| { \
printf "\e[31mError: Unable to upload asset.\e[0m\n" \
&& exit 3; \
}

printf "\e[32mSuccess\e[0m\n"
gh release upload "$tag" "$file_path"
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Notable changes to the `alacritty_terminal` crate are documented in its
[CHANGELOG](./alacritty_terminal/CHANGELOG.md).

## 0.14.0-dev
## 0.14.0

### Packaging

- Minimum Rust version has been bumped to 1.74.0

### Added

- Support relative path imports from config files
- `alacritty migrate` support for TOML configuration changes
- Headless mode using `alacritty --daemon`

### Changed

- Pressing `Alt` with unicode input will now add `ESC` like for ASCII input
- Decorations use opaque style and system window background on macOS
- No longer source `~/.zshenv` on macOS
- Moved config options `import`, `working_directory`, `live_config_reload`, and `ipc_socket`
to the new `general` section
- Moved config option `shell` to `terminal.shell`
- `ctrl+shift+u` binding to open links to `ctrl+shift+o` to avoid collisions with IMEs
- Use `Beam` cursor for single char cursor inside the IME preview

### Fixed

Expand All @@ -32,6 +43,14 @@ Notable changes to the `alacritty_terminal` crate are documented in its
- Config emitting errors for nonexistent import paths
- Kitty keyboard protocol reporting shifted key codes
- Broken search with words broken across line boundary on the first character
- Config import changes not being live reloaded
- Cursor color requests with default cursor colors
- Fullwidth semantic escape characters
- Windows app icon now displays properly in old alt+tab on Windows
- Alacritty not being properly activated with startup notify
- Invalid URL highlights after terminal scrolling
- Hollow block cursor not spanning multiple chars being edited inside the IME preview
- Vi inline search only working for direct key input without modifiers

## 0.13.2

Expand Down
Loading

0 comments on commit 458433e

Please sign in to comment.