-
Notifications
You must be signed in to change notification settings - Fork 341
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
Contextual preview panel visibility #1708
Comments
We already have the Based on that, implementing your request is very easy and only requires a few lines of Lua code, save these lines as local function setup()
ps.sub("hover", function()
local h = cx.active.current.hovered
if not h then
return
end
local is_image = (h:mime() or ""):find("image/") ~= nil
if is_image == require("hide-preview"):enabled() then
require("hide-preview"):entry()
end
end)
end
return { setup = setup } Then enable it in your require("contextual-preview"):setup() screenshot-002047.mp4
|
yazi --debug
outputPlease describe the problem you're trying to solve
Only show the preview panel for certain MIME types and optionally hide it on error/unsupported types.
Would you be willing to contribute this feature?
Describe the solution you'd like
Example: I really only care to see previews of images
(I know it's under
[open]
but we're already enumerating MIME types here, so...)Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: