I have been using the bg plugin to open videos in media player in background. However I have seen the ueberzug plugin which creates a file handler for fileviewer. My goal is to create a handler with the bg plugin so that i can run it like this
filextype <video/*> #Bg#run mpv %f
I know '&' is also an option to spawn the player separate, but I just want to know if the previous is possible. here is my current bg plugin
--[[
Provides :Bg command that runs external command in background displaying it on
job bar until its done.
Expands %-macros and $-environment variables.
Usage example:
:Bg sleep 10
--]]
local function bg(info)
local cmd = vifm.expand(info.args)
vifm.startjob {
cmd = cmd,
description = cmd,
visible = true
}
end
-- this does NOT overwrite pre-existing user command
local added = vifm.cmds.add {
name = "Bg",
description = "run an external command in background",
handler = bg,
minargs = 1,
maxargs = -1,
}
if not added then
vifm.sb.error("Failed to register :Bg")
end
added = vifm.addhandler {
name = "run",
handler = bg,
}
if not added then
vifm.sb.error("Failed to register bg#run")
end
return {}
and in my vifmrc
filextype <video/*> #Bg#run mpv %f
but it doesn't work for some reason.
Thanks always for your great work.
Also I have managed to modify the unpack plugin to ask password for encrypted zip files.
https://0x0.st/HWbb.txt
Hope I can be of help.