diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2026-02-28 21:52:26 +0200 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2026-02-28 21:52:26 +0200 |
| commit | 67a1c24a8661fdcbc48f72f7b65521772065d305 (patch) | |
| tree | 33c1fbfe2452c23773de046b1127f4920aa5a49f /example | |
| parent | 4fb29c95c61256f78e4b501a3c550b4c92a92a4e (diff) | |
dfm: add ranger style bulk rename
Also the ability to embed scripts within dfm.
Diffstat (limited to 'example')
| -rwxr-xr-x | example/opener_ext | 27 | ||||
| -rwxr-xr-x | example/opener_mime | 33 |
2 files changed, 0 insertions, 60 deletions
diff --git a/example/opener_ext b/example/opener_ext deleted file mode 100755 index ce1699a..0000000 --- a/example/opener_ext +++ /dev/null @@ -1,27 +0,0 @@ -#!/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 - diff --git a/example/opener_mime b/example/opener_mime deleted file mode 100755 index 2f7bd52..0000000 --- a/example/opener_mime +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -feu -# -# Example DFM_OPENER script using mimetype. -# - -mime_type=$(file -bi "$1") - -case $mime_type in - audio/*) - exec mpv --no-video "$1" - ;; - - video/*) - exec mpv "$1" - ;; - - image/*) - exec gimp "$1" - ;; - - text/html* | application/pdf*) - exec firefox "$1" - ;; - - text/*) - exec "${EDITOR:=vi}" "$1" - ;; - - *?*) - printf 'error: unhandled mime-type %s\n' "$mime_type" >&2 - ;; -esac - |