diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2026-02-27 13:41:56 +0200 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2026-02-27 13:41:56 +0200 |
| commit | da28548905dab7c60c3fcec4975ccfa23e315909 (patch) | |
| tree | 9cef34a718563969a6bcda5cfeff033eeaf6b1a0 /example/opener_ext | |
0.99.0
Diffstat (limited to 'example/opener_ext')
| -rwxr-xr-x | example/opener_ext | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/example/opener_ext b/example/opener_ext new file mode 100755 index 0000000..ce1699a --- /dev/null +++ b/example/opener_ext @@ -0,0 +1,27 @@ +#!/bin/sh -feu +# +# Example DFM_OPENER script using file extension. +# + +case $1 in + *.mkv | *.webm | *.mp4 | *.avi) + exec mpv -- "$1" + ;; + + *.opus | *.mp3 | *.wav | *.flac | *.ogg) + exec mus --no-shuffle -- "$1" + ;; + + *.jpg | *.jpeg | *.gif | *.png | *.CR2) + exec mpv --pause -- "$1" + ;; + + *.svg) + exec inkscape "$1" + ;; + + *?*) + exec "${EDITOR:-vim}" "$1" + ;; +esac + |