You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yazi
Version: 0.3.3 (Arch Linux 2024-09-05)
Debug :false
OS : linux-x86_64 (unix)
Ya
Version: 0.3.3 (Arch Linux 2024-09-05)
Emulator
Emulator.via_env: ("foot", "")
Emulator.via_csi: Ok(Foot)
Emulator.detect : Foot
Adapter
Adapter.matches: Sixel
Desktop
XDG_SESSION_TYPE : Some("wayland")
WAYLAND_DISPLAY : Some("wayland-1")
DISPLAY : Some(":0")
SWAYSOCK : None
HYPRLAND_INSTANCE_SIGNATURE: Some("0f594732b063a90d44df8c5d402d658f27471dfe_1726677924_1212395250")
WAYFIRE_SOCKET : None
SSH
shared.in_ssh_connection: false
WSL
WSL: false
Variables
SHELL : Some("/bin/zsh")
EDITOR : Some("nvim")
VISUAL : None
YAZI_FILE_ONE : None
YAZI_CONFIG_HOME : None
Text Opener
default: Some(Opener { run: "${EDITOR:-vi}\"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
block : Some(Opener { run: "${EDITOR:-vi}\"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
Multiplexers
TMUX :false
tmux version : No such file or directory (os error 2)
ZELLIJ_SESSION_NAME: None
Zellij version : No such file or directory (os error 2)
Dependencies
file : 5.45
ueberzugpp : No such file or directory (os error 2)
ffmpegthumbnailer: 2.2.3
magick : No such file or directory (os error 2)
fzf : 0.55.0
fd : 10.2.0
rg : 14.1.1
chafa : No such file or directory (os error 2)
zoxide : 0.9.5
7z : 17.05
7zz : No such file or directory (os error 2)
jq : 1.7.1
--------------------------------------------------
Please describe the problem you're trying to solve
Previewers/preloaders do not receive the args table. In my use case I would like the ability to pass the desired plugin to use for preloading/previewing, as My plugin is just a wrapper. Unless I am missing something, without this feature I would have to recompute the the mimetype( or use file extensions only ) for every file. Or create a separate plugin for each mimetype..
Would you be willing to contribute this feature?
Yes, I'll give it a shot
Describe the solution you'd like
Possible solutions:
Expose the args table as a variable so it can be used freely.
Ability to define a custom method that receives the args table and returns the peek/seek/preload functions.
Even though it may be better to have conditional previewer/preloader as a integrated feature eventually, I still think the ability to receive args could benefit even regular previewers/preloaders and is worth adding in.
Validations
I have searched the existing issues
The latest nightly build of Yazi doesn't already have this feature
The text was updated successfully, but these errors were encountered:
0xkept
changed the title
Previewers/preloaders - ability to receive arguments/ inherit state
Previewers/preloaders - ability to receive arguments
Sep 18, 2024
I'm going to lock this issue because it has been closed for 30 days. ⏳
This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
yazi --debug
outputPlease describe the problem you're trying to solve
Previewers/preloaders do not receive the args table. In my use case I would like the ability to pass the desired plugin to use for preloading/previewing, as My plugin is just a wrapper. Unless I am missing something, without this feature I would have to recompute the the mimetype( or use file extensions only ) for every file. Or create a separate plugin for each mimetype..
Would you be willing to contribute this feature?
Describe the solution you'd like
Possible solutions:
{ mime = "image/*", run = "plugin:method() --args='image'" },
]
Additional context
Even though it may be better to have conditional previewer/preloader as a integrated feature eventually, I still think the ability to receive args could benefit even regular previewers/preloaders and is worth adding in.
Validations
The text was updated successfully, but these errors were encountered: