## ~/.mailcap
##
## SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
##
## SPDX-License-Identifier: AGPL-3.0-or-later
##
## Definitions: https://www.iana.org/assignments/media-types/media-types.xhtml

## Allow some type of media to be viewed.
text/html; w3m -I %{charset} -dump -T text/html '%s' | cat -s; nametemplate=%s.html; edit=; copiousoutput; needsterminal; test=test -t 0
text/plain; VISUAL="echo Editing prohibited\; sleep 2\; false" LESS="" less -- '%s'; edit=; needsterminal; test=test -t 0

## The remaining media types are always opened in @dispvm.
application/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
audio/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
font/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
example/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
image/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
message/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
model/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
multipart/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
video/*; echo "Opening file in DispVM" && qvm-open-in-dvm -- '%s'
