summaryrefslogtreecommitdiff
path: root/debian/.config/yazi/plugins/zoom.yazi/README.md
blob: 9be8025f612d5059f60cda618914fb05f2c1a4f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
> [!NOTE]
> The latest Yazi nightly build is required to use this plugin at the moment.

# zoom.yazi

Enlarge or shrink the preview image of a file, which is useful for magnifying small files for viewing.

Supported formats:

- Images - requires [ImageMagick](https://imagemagick.org/) (>= 7.1.1)

Note that, the maximum size of enlarged images is limited by the [`max_width`][max_width] and [`max_height`][max_height] configuration options, so you may need to increase them as needed.

https://github.com/user-attachments/assets/b28912b1-da63-43d3-a21f-b9e6767ed4a9

[max_width]: https://yazi-rs.github.io/docs/configuration/yazi#preview.max_width
[max_height]: https://yazi-rs.github.io/docs/configuration/yazi#preview.max_height

## Installation

```sh
ya pkg add yazi-rs/plugins:zoom
```

## Usage

```toml
# keymap.toml
[[mgr.prepend_keymap]]
on   = "+"
run  = "plugin zoom 1"
desc = "Zoom in hovered file"

[[mgr.prepend_keymap]]
on   = "-"
run  = "plugin zoom -1"
desc = "Zoom out hovered file"
```

## Advanced

If you want to apply a default zoom parameter to image previews, you can specify it while setting this plugin up as a custom previewer, for example:

```toml
[[plugin.prepend_previewers]]
mime = "image/{jpeg,png,webp}"
run  = "zoom 5"
```

## TODO

- [ ] Support more file types (e.g., videos, PDFs), PRs welcome!

## License

This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.