This afternoon some brazilian guys from #develop
wanted to render images attachements in mutt
within terminology
.
I wanted to do that for quite some time but never took the time to do that. It is actually quite easy to do that. The only thing needed is the following line in your mailcap file:
image/*; typop %s && sleep 1; test=test -n "$TERMINOLOGY"
typop
only writes some escape codes to let terminology
know that it needs to show a file on popup. The sleep 1
is here to make sure terminology
has the time to load the image before mutt
removes the file as typop
exits as soon as it has sent the escape codes.
The test
part is here to ensure the command is only ran within terminology
. You could then have an other viewer when using mutt
from a different terminal emulator, but who would do that?
This operation only works locally since typop
only sends the path to the file, not the content of the file. This feature could be done in future versions.
This can also be done for videos since terminology
can also render them.
Mandatory screenshot of the feature: