Skip to content

Commit

Permalink
feat: new ueberzug_scale and ueberzug_offset option
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Oct 23, 2023
1 parent 577cdbb commit 42cf9e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.2","words":["linemode"],"language":"en","flagWords":[]}
{"version":"0.2","words":["linemode","Hyprland","ueberzug","yazi"],"language":"en","flagWords":[]}
9 changes: 9 additions & 0 deletions usage/configuration/yazi.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ If you haven't created and used your own configuration file yet, please see [Con
- max_height: Maximum preview height for images. Do a `yazi --clear-cache` to take effect after changing this.
- cache_dir: The system cache directory is used by default, and the cached files will go away on a reboot automatically. If you want to make it more persistent, you can specify the cache directory manually as an absolute path.

### Ueberzug-specific

- ueberzug_scale (Float): Ueberzug image scaling ratio, `scale>1` for enlargement, `scale<1` for reduction. For example, `0.5` indicates a reduction to half.
- ueberzug_offset (`[x, y, width, height]`): Ueberzug image offset, in cell units. For example, `[0.5, 0.5, -0.5, -0.5]` indicates that the image is offset by half a cell in both directions, and the width and height are reduced by half a cell.

This is useful for solving [the bug of Ueberzug image size calculation](https://github.com/jstkdng/ueberzugpp/issues/122).

If your monitor has a `2.0` scale factor, and is running on Wayland under Hyprland, you may need to set `ueberzug_scale: 0.5`, and adjust the value of `ueberzug_offset` according to your case, to offset this issue.

## opener

Configure available openers, for example:
Expand Down

0 comments on commit 42cf9e5

Please sign in to comment.