blob: 09ebab8287883190faa0d65d5f1055e1c15b5ab2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env sh
tmp="/tmp/dmvids"
dirs="${1:-$HOME/vids $HOME/dl}"
choice="$(find -L $dirs 2> /dev/null |
grep '^.\+\.\(webm\|mp4\|mpeg\|mkv\)$' |
sort | tee "$tmp" |
sed "s#^$HOME#\~#;s#\([^/]\)[^/]*/#\1/#g" |
commander -n -x)"
file="$(sed -n "${choice}p" "$tmp")"
[ -r "$file" ] || exit 1
mpv "$file"
|