Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yazi 0.4.0 #200480

Merged
merged 2 commits into from
Dec 8, 2024
Merged

yazi 0.4.0 #200480

merged 2 commits into from
Dec 8, 2024

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
This is the biggest release ever, with 53 new features, 41 fixes, and 12 performance optimizations. 

The main focus of this release is improving the plugin system, and we’ve made some adjustments to certain APIs based on real-world usage to better support future extensibility. This release is a key step in moving the plugin system from BETA to stable!

This is a breaking change release, so please make sure to read: Migrating to Yazi v0.4.0

Spotter

sxyazi/yazi#1802 introduces the concept of "spotter". When you "spot" a file, a popup will show up with metadata about that file.

For example, it can display the mime type and size of a regular file, the dimensions and color space of an image, the duration and resolution of a video, or the line count of a code file, etc.

You can easily copy this info with a simple keystroke or quickly swipe through files in the spot window.

What's even cooler is that users can set custom spotters for different file types, and plugin developers can use Lua APIs to build various spotters, just like with previewers!

output.mp4

Support for Transparent Image Preview

Transparent image previews are now supported in sxyazi/yazi#1556 (Thanks to @diegodorado), and it works across all 4 image backends Yazi supports (kitty graphics-protocol, Inline images protocol, Sixel graphics format, Überzug ).

screenshot-002179

Auto Switch Between Dark and Light Icons/Flavors Based on Terminal Background

sxyazi/yazi#1946 adds dark/light mode support — Yazi will automatically detect your terminal's color scheme and choose the appropriate icon color and flavor.

In theme.toml, the [flavor] section now includes two new attributes, dark and light, to allow setting different flavors for light and dark modes:

# theme.toml
[flavor]
dark  = "dracula"
light = "one-light"

New ya emit and ya emit-to Subcommands to Emit Commands to a Specific Instance

Two new subcommands, ya emit and ya emit-to, have been added to the ya CLI tool in sxyazi/yazi#1946.

They allow you to send commands from outside Yazi (e.g., from your shell) to run on a specific Yazi instance for better interactivity.

The new ya emit subcommand allows users to send a command to the current Yazi instance. The format is:

ya emit <command> <args>

For example:

ya emit cd /tmp
ya emit reveal /tmp/foo

Just like you would write them in your keymap.toml file! You can also send commands to a specific remote instance using ya emit-to:

ya emit-to <receiver> <command> <args>

For example:

ya emit-to "$YAZI_ID" cd /tmp

Support Passing Arguments to Previewer/Preloader/Spotter/Fetcher

With sxyazi/yazi#1979, you can now pass arguments to previewers, preloaders, spotters, and fetchers when configuring them:

# yazi.toml
[plugin]
prepend_previewers = [
  { mime = "image/*", run = 'my-plugin test --foo --bar=baz' }
]
prepend_preloaders = [
  { mime = "image/*", run = 'my-plugin test --foo --bar=baz' }
]
prepend_spotters = [
  { mime = "image/*", run = 'my-plugin test --foo --bar=baz' }
]
prepend_fetchers = [
  { id = "test", mime = "image/*", run = 'my-plugin test --foo --bar=baz' }
]

This makes them much more flexible, meaning the same plugin can behave differently based on different arguments, tailored to the user's preferences!

Suggest Keywords in the Header When a Finder Is Active

A new keyword indicator has been added to the header, in sxyazi/yazi#1847, letting users know the current finding state with real-time feedback:

screenshot-002086.mp4

Allow Disabling Certain Preset Keybinds with the New noop Virtual Command

A new noop command has been introduced in sxyazi/yazi#1882:

[[manager.prepend_keymap]]
on  = [ "g", "c" ]
run = "noop"

This allows users to disable specific default keybindings, and the disabled keys won’t appear in the "which key" component or the help menu.

Make the Built-in extract Plugin Support Compressed Tarballs (*.tar.gz, *.tar.bz2, etc.)

The built-in extract plugin now has experimental support for extracting compressed tarballs, making it more convenient for users who frequently work with .tar files.

Thanks to @DirkFi for his excellent work on sxyazi/yazi#1583

Prioritize Paths That Need to Be Processed First During Bulk Renaming

The bulk renaming feature now has smart conflict resolution, done in sxyazi/yazi#1801 (thanks to @yw1ee).

For example, if you’re renaming a list of files:

1
2
3

And renaming them to:

1 -> 2
2 -> 3
3 -> 4

Previously, Yazi would stop with an error when trying to rename 1 -> 2 because 2 already exists.

Now, it will intelligently pick files that won’t conflict and process them in order, so in this case, it will rename them like this:

3 -> 4
2 -> 3
1 -> 2

Fallback to CSI 16 t for Terminals That Don’t Support TIOCGWINSZ

All terminals on Windows (MS Terminal, WezTerm for Windows) do not support TIOCGWINSZ because Windows doesn't have ioctl.

Some terminals based on node-pty also don't support it (like Tabby, VSCode, Hyper, etc.).

sxyazi/yazi#2004 falls back to CSI 16 t when TIOCGWINSZ is unavailable to provide better image size calculation for previews.

screenshot-002175.mp4

Launch From Preset Settings If the User’s Config Cannot Be Parsed

Now, if Yazi can’t parse your config file because of invalid values, it will ask if you want to launch with the default settings instead of failing to start.

This improves the user experience. Done in sxyazi/yazi#1832

Other improvements

These are a few of my favorite features. For a complete list of improvements in Yazi 0.4, check out the full changelog below.

What's Changed

New Contributors

Full Changelog: sxyazi/yazi@v0.3.3...v0.4.0

@github-actions github-actions bot added rust Rust use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Dec 8, 2024
Copy link
Contributor

github-actions bot commented Dec 8, 2024

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Dec 8, 2024
@BrewTestBot BrewTestBot enabled auto-merge December 8, 2024 18:09
@BrewTestBot BrewTestBot added this pull request to the merge queue Dec 8, 2024
Merged via the queue into master with commit 7d786e1 Dec 8, 2024
15 checks passed
@BrewTestBot BrewTestBot deleted the bump-yazi-0.4.0 branch December 8, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. rust Rust use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants