aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/movie
blob: 1cee6f599e8ebcdf6d76890c954198ffb021f7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash


if [ -t 0 ]; then
    filename="$(find ~/remote/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fzf)"
else
    filename="$(find ~/remote/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fuzzel  -d -l 25)"
fi

filepath="$(find ~/remote/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
mpv "$(grep "$filename" <<< "$filepath")"