Skip to content

Generate freedesktop-compatible thumbnails while using yazi

License

Notifications You must be signed in to change notification settings

Sonico98/allmytoes.yazi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Allmytoes.yazi

Generate and preview freedesktop-compatible thumbnails for images on Yazi with the power of AllMyToes.

Installation

# Linux only
git clone https://github.com/Sonico98/allmytoes.yazi.git ~/.config/yazi/plugins/allmytoes.yazi

Usage

For the time being, it's recommended to follow these steps instead.

If you build yazi from source, starting from commit c2affae you can add the following to your yazi.toml configuration file:

Only compatible with commit c2affae or higher (or yazi 0.2.6, to be released) Add this to your `yazi.toml`:
[plugin]
prepend_previewers = [
	# Allmytoes doesn't handle these by default
	{ mime = "image/svg+xml", run = "magick" },
	{ mime = "image/heic",    run = "magick" },
	{ mime = "image/jxl",     run = "magick" },
	# Handle other image types with allmytoes
	{ mime = "image/*", run = "allmytoes" },
]

prepend_preloaders = [
	# Allmytoes doesn't handle these by default
	{ mime = "image/svg+xml", run = "magick" },
	{ mime = "image/heic",    run = "magick" },
	{ mime = "image/jxl",     run = "magick" },
	# Handle other image types with allmytoes
	{ mime = "image/*", run = "allmytoes" },
]

Make sure you have AllMyToes installed and in your PATH.

Why would I want this instead of the default image previewer?

Compatibility

Because the thumbnails follow the freedesktop spec, they can be generated from any other application that follows the spec, like graphical file managers. This means you'll be able to re-use preexisting thumbnails between yazi and other programs.

Fast

Once generated, yazi will display the largest thumbnail directly the next time you use it. It works just like how the default previewer caches images, but in a multi-application compatible way, and persistent across reboots by default. In my limited, not benchmarked tests, I could notice faster image previews in directories containing multiple large images using allmytoes than with the default previewer.

About

Generate freedesktop-compatible thumbnails while using yazi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages