Add ability to use image previewers (#531)

* Return early on error in nav.preview

* nav.checkReg now returns a boolean instead of calling nav.preview

* Pass width, height, x, and y parameters to preview script

* Check previewer for exit code

If non-zero the preview will be assumed to have side-effects.

* Add the cleaner option

This is called upon selection changes if the previous preview was
volatile. To this end, volatilePreview was added to the nav struct
This commit is contained in:
neeshy authored and GitHub committed 2020-12-24 16:13:20 +03:00
1 parent c2fe88e9a0
commit 82f03102a5
9 files changed
+98 -25

No files matched your search

+2
View File
@@ -263,6 +263,8 @@ func (e *setExpr) eval(app *app, args []string) {
gOpts.info = toks
case "previewer":
gOpts.previewer = replaceTilde(e.val)
case "cleaner":
gOpts.cleaner = replaceTilde(e.val)
case "promptfmt":
gOpts.promptfmt = e.val
case "ratios":